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

Brad Taylor brad at getcoded.net
Wed Jun 15 14:40:11 EDT 2005


Hi,

>  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 ?

[...]

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

Like all C# classes, you need to intialize pixbuf before using it, i.e.:

       pixbuf = new Gdk.Pixbuf (...);

Several argument lists are available for this constructor.  You can find
them all at http://go-mono.org/docs/monodoc.ashx?link=T%3aGdk.Pixbuf%2f%
2a.

>   }

-- 
Brad Taylor
Genome Software LLC
http://www.getcoded.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050615/2d846864/attachment.bin


More information about the Gtk-sharp-list mailing list