TLLineShape
See source codeA line shape that represents a multi-point line or spline on the canvas. Line shapes allow users to draw connected paths with multiple points, supporting both straight line segments and smooth curved splines.
type TLLineShape = TLBaseShape<'line', TLLineShapeProps>
Example
const lineShape: TLLineShape = {
id: 'shape:line1',
type: 'line',
x: 100,
y: 100,
rotation: 0,
index: 'a1',
parentId: 'page:main',
isLocked: false,
opacity: 1,
props: {
color: 'red',
dash: 'dashed',
size: 'l',
spline: 'cubic',
points: {
start: { id: 'start', index: 'a1', x: 0, y: 0 },
end: { id: 'end', index: 'a2', x: 200, y: 100 },
},
scale: 1,
},
meta: {},
typeName: 'shape',
}
Prev
TLLanguageNext
TLLineShapeSplineStyle