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