[pygtk] PyGTK + Cairo + PNG file in the background
Fabrice DELENTE
delentef at gmail.com
Sat Sep 12 01:14:13 WST 2009
> Here are a couple of lines to get you started:
>
> surface = cairo.ImageSurface.create_from_png(path)
> ctx = cairo.Context(surface)
Thanks! If I understand correctly, I can then draw on ctk using move_to,
line_to and paint?
Another thing: is there a way to scale down an image using cairo, or do I
have to first scale down my image myself (the PNG is about 2000x2000, and my
window is about 1000x800).
Thanks again.
--
Fabrice DELENTE
More information about the pygtk
mailing list