Hi Francisco,
If you have a png on disk, this is done like so:
void PaintImage( Context ctx, ImageSurface img, int x, int y ){
img.Show( ctx, x, y );
}
...
ImageSurface image = new ImageSurface( filename );
PaintImage( ctx, image, 10, 20 );
If you have a Gtk.Image and want to turn it into a Cairo ImageSurface
then you at the moment have to do something horrible like this:
Gtk.Image myImage;
...
Gdk.PixBuf buf = myImage.PixBuf;
buf.Save( "temp_convert","png" );
ImageSurface image = new ImageSurface ( "temp_convert" );
Regards
Ian
On Tue, 2010-11-16 at 19:29 +0000, Francisco M. Marzoa wrote:
> Hello,
>
> I've a Gtk.Image widget with a given content and I just want to copy
> that content within a Gtk.DrawingArea, is this possible in an easy manner?
>
> Thanks in advance,
>
> _______________________________________________
> Mono-list maillist - [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list