Image

Describes an image with placement options such as position, rotation, and scale. Does not include opacity or how the image is fit within the geometry it fills — those live on ImageFill.

To load image pixel data for an Image, pass it to getImageFromURL which returns an ImageData.

Constructors

Image(image,options)Image
image
(string | Image)
options
Partial<ImageOptions>
{}

Properties

.urlstring

The URL of the image (e.g. starts with cuttle-image://).

.positionVec

Additional positional offset applied to the image.

.rotationnumber

Additional rotation (degrees) applied around the center of the placed image.

.scalenumber

Additional scale applied around the center of the placed image.