@mocanvas/editor · class

Rectangle2d

declare class Rectangle2d extends Geometry2d

An axis-aligned rectangle, optionally offset from the shape's origin.


Methods · 6

constructor(config: Flags & {
getArea(): number
getBounds(): Box
getLength(): number
getVertices(): Vec[]
toPathWords(): number[]

Properties · 4

readonly h: number
readonly w: number
readonly x: number
readonly y: number

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.