@mocanvas/editor · type
type EngineGeometry = {
w: number;
h: number;
isClosed: boolean;
isFilled: boolean;
} & ({
type: "geo";
kind: number;
flipX?: boolean;
flipY?: boolean;
/**
* The width the outline will be stroked at, for the marks drawn inside it;
* see `CommandWriter.setGeo`. Omitted is the same as 0, which is right for
* every kind that has no such marks.
*/
strokeWidth?: number;
} | {
type: "spline" | "poly";
points: ArrayLike<number>;
closed?: boolean;
} | {
type: "draw";
segments: readonly {
points: ArrayLike<number>;
freehand: boolean;
}[];
closed?: boolean;
})A built-in shape's outline, described by the numbers that generate it.
The engine has a generator per kind, so nothing has to send vertices.
See ShapeUtil.getEngineGeometry.
Mentioned here
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.