Table of contents

Public class

Signature
class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {}
References

ShapeUtil, TLHighlightShape

Source

packages/tldraw/src/lib/shapes/highlight/HighlightShapeUtil.tsx


Properties

hideResizeHandles

Public property

Signature
hideResizeHandles: (shape: TLHighlightShape) => boolean
References

TLHighlightShape


hideRotateHandle

Public property

Signature
hideRotateHandle: (shape: TLHighlightShape) => boolean
References

TLHighlightShape


hideSelectionBoundsFg

Public property

Signature
hideSelectionBoundsFg: (shape: TLHighlightShape) => boolean
References

TLHighlightShape


migrations

Public static property

Signature
static migrations: import('@tldraw/editor').Migrations
References

Migrations


onResize

Public property

Signature
onResize: TLOnResizeHandler<TLHighlightShape>
References

TLOnResizeHandler, TLHighlightShape


props

Public static property

Signature
static props: {
  color: import('@tldraw/editor').EnumStyleProp<
    | 'black'
    | 'blue'
    | 'green'
    | 'grey'
    | 'light-blue'
    | 'light-green'
    | 'light-red'
    | 'light-violet'
    | 'orange'
    | 'red'
    | 'violet'
    | 'yellow'
  >
  size: import('@tldraw/editor').EnumStyleProp<'l' | 'm' | 's' | 'xl'>
  segments: import('@tldraw/editor').ArrayOfValidator<{
    type: 'free' | 'straight'
    points: import('@tldraw/editor').VecModel[]
  }>
  isComplete: import('@tldraw/editor').Validator<boolean>
  isPen: import('@tldraw/editor').Validator<boolean>
}
References

EnumStyleProp, ArrayOfValidator, VecModel, Validator


type

Public static property

Signature
static type: 'highlight'

Methods

backgroundComponent()

Public method

Signature
backgroundComponent(
  shape: TLHighlightShape
): import('react/jsx-runtime').JSX.Element
Parameters
NameDescription

shape

TLHighlightShape
Returns
import('react/jsx-runtime').JSX.Element
References

TLHighlightShape


component()

Public method

Signature
component(shape: TLHighlightShape): import('react/jsx-runtime').JSX.Element
Parameters
NameDescription

shape

TLHighlightShape
Returns
import('react/jsx-runtime').JSX.Element
References

TLHighlightShape


getDefaultProps()

Public method

Signature
getDefaultProps(): TLHighlightShape['props']
References

TLHighlightShape


getGeometry()

Public method

Signature
getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d
Parameters
NameDescription

shape

TLHighlightShape
Returns
Circle2d | Polygon2d
References

TLHighlightShape, Circle2d, Polygon2d


indicator()

Public method

Signature
indicator(shape: TLHighlightShape): import('react/jsx-runtime').JSX.Element
Parameters
NameDescription

shape

TLHighlightShape
Returns
import('react/jsx-runtime').JSX.Element
References

TLHighlightShape


toBackgroundSvg()

Public method

Signature
toBackgroundSvg(shape: TLHighlightShape): SVGPathElement
Parameters
NameDescription

shape

TLHighlightShape
Returns
SVGPathElement
References

TLHighlightShape


toSvg()

Public method

Signature
toSvg(shape: TLHighlightShape): SVGPathElement
Parameters
NameDescription

shape

TLHighlightShape
Returns
SVGPathElement
References

TLHighlightShape


HighlightShapeToolIcon