@mocanvas/mocanvas · class

ImageShapeUtil

declare class ImageShapeUtil extends BaseBoxShapeUtil<ImageShape>

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Methods · 8

component(shape: ImageShape): ReactNode
getDefaultProps(): ImageShapeProps
getGeometry(shape: ImageShape): Geometry2d
getIndicatorPath(shape: ImageShape): Path2D
getRenderStyle(shape: ImageShape): StyleWords | null

A white textured quad over the shape's bounds, or null for the DOM overlay path.

isAspectRatioLocked(_shape: ImageShape): boolean
needsOverlay(shape: ImageShape): boolean

The DOM overlay draws the image until (and unless) its texture is ready.

onCrop(shape: ImageShape, info: TLCropInfo<ImageShape>): Partial<ImageShape> | undefined

Cropping an image resizes the window, not the picture; the arithmetic is shared with every other croppable shape.


Properties · 5

static migrations: _mocanvas_editor.PropsMigrations
static options: ImageShapeOptions
readonly options: ImageShapeOptions
static props: _mocanvas_editor.RecordProps<ImageShape>
static type: "image"

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.