class Pixmap
A Pixmap is an offscreen area that can be used both as a destination for
drawing and a source of image data for drawing in a View or another Pixmap.
Constructor
- Pixmap(width, height)
- Creates a new, empty Pixmap with the given width and height.
Properties
- width
- Read only. The width of the Pixmap in pixels.
- height
- Read only. The height of the Pixmap in pixels.
- size
- Read only. The size of the Pixmap in pixels.
- bounds
- Read only. The bounding rectangle of the Pixmap. The
top left corner will always be (0, 0).
Methods
- draw(canvas, src_rect, dst_rect)
- Draws the part of the Pixmap specified by src_rect in the
area of the given canvas specified by dst_rect. If src_rect
and dst_rect are different sizes, the image is scaled to fit.
- with_canvas(proc)
- Calls the given procedure with a Canvas
suitable for drawing on this Pixmap. The canvas is valid only for the duration
of the call, and should not be retained beyond it.
---