class ImageBase
ImageBase is an abstract base class for 2D images that can be drawn on a Canvas.
Properties
- width
- Read only. The width of the image in pixels.
- height
- Read only. The height of the image in pixels.
- size
- Read only. The size of the image in pixels.
- bounds
- Read only. The bounding rectangle of the image. The
top left corner will always be (0, 0).
Methods
- draw(canvas, src_rect, dst_rect)
- Draws the part of the image 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.