Skip to content

Image

Inherits: Shape

Draws an image.

Properties

Properties#

height class-attribute instance-attribute #

height: Optional[Number] = None

The height of the rectangle to draw the image into. Use image height if None.

paint class-attribute instance-attribute #

paint: Optional[Paint] = None

A paint to composite the image into canvas.

src class-attribute instance-attribute #

src: Optional[Union[str, bytes]] = None

Draws an image from a source.

Accepts URLs/paths, base64 strings, or raw bytes.

width class-attribute instance-attribute #

width: Optional[Number] = None

The width of the rectangle to draw the image into. Use image width if None.

x class-attribute instance-attribute #

x: Optional[Number] = None

The x-axis coordinate of the image's top-left corner.

y class-attribute instance-attribute #

y: Optional[Number] = None

The y-axis coordinate of the image's top-left corner.