Image
The image shape is used to place images on the canvas.
Drawing Method
Click twice to complete drawing:
- First click to set the starting position of the image
- Move mouse to preview the image size in real-time
- Second click to set the image size and complete drawing
You can hold the space key to pan the canvas while drawing.
Data
ts
export interface ImageData extends ShapeData {
x: number
y: number
width?: number
height?: number
src: string
shapeName: 'image'
}