@mocanvas/editor · interface

TLShapeCrop

interface TLShapeCrop

The visible window over a croppable shape's content, in normalized coordinates: { topLeft: { x: 0, y: 0 }, bottomRight: { x: 1, y: 1 } } is the whole thing.

Normalized rather than absolute on purpose — an image cropped to its middle third stays cropped to its middle third when the shape is resized, and the crop needs no knowledge of the source's pixel dimensions to be applied.


Properties · 3

bottomRight: VecLike
isCircle?: boolean

Whether the crop window is a circle inscribed in that rectangle.

topLeft: VecLike

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.