@mocanvas/mocanvas · class
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): ReactNodegetDefaultProps(): ImageShapePropsgetGeometry(shape: ImageShape): Geometry2dgetIndicatorPath(shape: ImageShape): Path2DgetRenderStyle(shape: ImageShape): StyleWords | nullA white textured quad over the shape's bounds, or null for the DOM overlay path.
isAspectRatioLocked(_shape: ImageShape): booleanneedsOverlay(shape: ImageShape): booleanThe DOM overlay draws the image until (and unless) its texture is ready.
onCrop(shape: ImageShape, info: TLCropInfo<ImageShape>): Partial<ImageShape> | undefinedCropping an image resizes the window, not the picture; the arithmetic is shared with every other croppable shape.
Properties · 5
static migrations: _mocanvas_editor.PropsMigrationsstatic options: ImageShapeOptionsreadonly options: ImageShapeOptionsstatic 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.