pythonwin in memory device context
Fredrik Lundh
fredrik at pythonware.com
Thu May 1 09:20:55 EDT 2003
Ilariu Raducan wrote:
> Does anybody has an example how to use a memory device context?
> Let me explain what I want to do:
>
> Load an image with PIL.Image
> create a ImageWin.Dib object
> paste the image in dib
at this point, PIL has created a memory DC for you.
> Then for each OnDraw
>
> use StretchBlt to paint a part/all image on the client window
I didn't mention it in my earlier post, but PIL's "draw" method
takes an optional third argument:
dib.draw(dc, destination_rectangle, source_rectangle)
the default source is the entire image.
</F>
More information about the Python-list
mailing list