[Gtk-sharp-list] Pixbuf.CopyArea -- Destination Pixbuf != Null

Alexander Reiter r.alex at utanet.at
Wed Jun 15 13:45:29 EDT 2005


Hi all,

 maybe someone can give me a short hint. I am new to GTK programming and
 currently I am playing around with the basic functions.  in the 
following example,
 what do I have to assign to the pixbuf variable to avoid the 
"dest_pixbuf != NULL' failed" error ?

code example:

using System;
using Gtk;

public class PicChanger
{
  private Gdk.Pixbuf pixbuf;

  
//---------------------------------------------------------------------------------------------- 

  public PicChanger(string filename)
  {
     Console.WriteLine(filename);
     Gdk.Pixbuf tempPixbuf = new Gdk.Pixbuf(filename);
     tempPixbuf.CopyArea(100,100,50,50,pixbuf,0,0);
  }
    
//---------------------------------------------------------------------------------------------- 

  public Gdk.Pixbuf Pixbuf
  {
     get
     {
        return pixbuf;
     }
  }
}

thanks a lot in advance.

br
alex


More information about the Gtk-sharp-list mailing list