[Gtk-sharp-list] Cropping an Image

Vinicius Cordeiro viniciuscordeiro at gmail.com
Thu Apr 29 09:58:12 EDT 2010


Hi,

I have an Image widget inside an EventBox and I'm handling mouse events to
get X1,Y1 point and X2, Y2 point of a Rectangle, and with those Coordinates
I want to crop the PixBuf that is loaded on Image Widget...

I'm trying a lot of ways to do that, but nothing is working...

i've tried .CopyArea to copy from on pixbuf to a new one, but it's always
telling me that the new one is empty and didn't copy selected area...

perfil1.CopyArea (Xin, Yin, (Xout - Xin), (Yout - Yin), perfilRecortado, 0,
0);

And when I do:

imageWidget.PixBuf = perfilRecortado;

Nothing is been showing on Image Widget...

How can I solve that?

Thanks in advance,
Vinicius Cordeiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20100429/6a6e1225/attachment.html 


More information about the Gtk-sharp-list mailing list