[Gtk-sharp-list] Gdk.Pixbuf.RenderPixmapAndMask question

Mariano Benedettini mbenedettini at ad-net.us
Mon Nov 28 13:33:05 EST 2005


Hello Dan,

Can you point me in the direction of a solution for this problem?:

...
Gdk.Pixmap pixmapOut, pixmapOutMask;
...
myPixbuf.RenderPixmapAndMask(out pixmapOut, out pixmapOutMask, 255);
image3.SetFromPixmap(pixmapOut, pixmapOutMask);


test1.cs(92,6): error CS1502: The best overloaded method match for 
`Gtk.Image.SetFromPixmap(Gdk.Pixmap, Gdk.Bitmap)' has some invalid arguments
test1.cs(92,6): error CS1503: Argument 2: Cannot convert from 
`Gdk.Pixmap' to `Gdk.Bitmap'
Compilation failed: 2 error(s), 0 warnings


Thanks,
Mariano.

Dan Winship wrote:
> Mariano Benedettini wrote:
> 
>> Hello,
>>
>> Monodoc says that Gdk.Pixbuf.RenderPixmapAndMask returns a mask of 
>> type Gdk.Pixmap ( and actually, it does). But, according to the Gtk 
>> Api, it should return a Gdk.Bitmap 
>> (http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html#gdk-pixbuf-render-pixmap-and-mask). 
>>
>>
>> Is this right, or am I missing something here?
>> Should this be fixed ?
> 
> 
> GdkBitmap isn't actually its own type, it's just a typedef alias for 
> GdkPixmap. Since C# doesn't have typedefs, we have to call them all 
> Gdk.Pixmaps (the same way GtkAllocation becomes Gdk.Rectangle).
> 
> -- Dan
> 
> 



More information about the Gtk-sharp-list mailing list