TLLineShapeProps

See source code
Table of contents

Properties for a line shape. Line shapes represent multi-point lines or splines that can be drawn by connecting multiple points with either straight segments or curves.

interface TLLineShapeProps {}

Example

const lineProps: TLLineShapeProps = {
  color: 'black',
  dash: 'solid',
  size: 'm',
  spline: 'line',
  points: {
    a1: { id: 'a1', index: 'a1', x: 0, y: 0 },
    a2: { id: 'a2', index: 'a2', x: 100, y: 50 },
  },
  scale: 1,
}

Properties

color

Color style of the line stroke


dash

Dash pattern style for the line (solid, dashed, dotted)


points

Dictionary of points that make up the line, keyed by point ID

points: Record<string, TLLineShapePoint>

scale

Scale factor applied to the line shape for display

scale: number

size

Size/thickness style of the line stroke


spline

Interpolation style between points (straight lines or curved splines)


Prev
TLLineShapePoint
Next
TLNoteShapeProps