@mocanvas/mocanvas · class
declare class HighlightShapeUtil extends ShapeUtil<HighlightShape, HighlightShapeUtilDisplayValues>A translucent marker stroke, drawn behind the shapes it marks.
Methods · 10
backgroundComponent(_shape: HighlightShape): ReactNodeThe highlight belongs *behind* the shapes it marks, so a renderer with a
background layer draws it from here instead of from component.
Both are null because the stroke is painted on the GPU from
getRenderStyle; the method exists so that a renderer asking "does
this shape want a background pass?" gets a truthful answer, and so a
subclass has the seam to paint one in the DOM.
canResize(_shape: HighlightShape): booleancomponent(_shape: HighlightShape): ReactNodegetDefaultProps(): HighlightShapePropsgetEngineGeometry(shape: HighlightShape): EngineGeometryThe same freehand generator a draw shape uses, so a highlight and a pen stroke recorded from the same movement have the same silhouette; only the width, the colour and the opacity differ, and those are render style.
getGeometry(shape: HighlightShape): Geometry2dgetIndicatorPath(shape: HighlightShape): Path2DgetRenderStyle(shape: HighlightShape): StyleWordshideResizeHandles(_shape: HighlightShape): booleanonResize(shape: HighlightShape, info: ResizeInfo<HighlightShape>): Partial<HighlightShape>Properties · 5
static migrations: _mocanvas_editor.PropsMigrationsstatic options: HighlightShapeOptionsreadonly options: HighlightShapeOptionsstatic props: _mocanvas_editor.RecordProps<HighlightShape>static type: "highlight"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.