[pygtk] Drawing over a scrolled image
Fabrice Delente
delentef at gmail.com
Tue Sep 15 19:54:34 WST 2009
2009/9/14 A.T.Hofkamp <a.t.hofkamp at tue.nl>
> I think you have two options:
> a. Modify the image before displaying it.
> b. Don't use a gtk.Image widget.
>
> As for the second option, if you want more than just displaying an image,
> gtk.Image is not what you want to have. Instead, use a gtk.DrawingArea in
> the viewport, and draw the image onto the DrawingArea.window . However,
> since a DrawingArea allows arbitrary drawing operations in arbitrary order,
> you are free to add more lines etc after rendering the image.
>
Thanks for your answer.
I wasn't specific enough: when I say image, it's in fact a PNG file; I load
it in a gtk.Image with load_from_file, and I didn't find any method in
gtk.DrawingArea to display a pixbuf (as gtk.Image contains a pixbuf).
Do you know of any method to display a pixbuf in a gtk.DrawingArea?
Thank!
--
Fabrice DELENTE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090915/30093414/attachment.htm
More information about the pygtk
mailing list