@fabwcie/free-drawing / @types/shapes
@types/shapes
Type Aliases
Anchor
Anchor =
"top"|"right"|"bottom"|"left"
Defined in: packages/free-drawing/src/@types/shapes.ts:9
Side of a shape (its middle) an arrow end is fixed to
ArrowEnds
ArrowEnds =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:71
Ends of an arrow and boxes of its linked shapes in coordinates of the arrow, to route it (see routeArrow of utils/arrow)
Properties
boxes
boxes:
EndBoxes
Defined in: packages/free-drawing/src/@types/shapes.ts:77
Boxes of the linked shapes (bounding boxes in coordinates of the arrow), only for elbow arrows
end
end:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:75
End of arrow
start
start:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:73
Start of arrow
ArrowHandleDrag
ArrowHandleDrag =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:105
Drag of the handle of a selected arrow (see ArrowHandle of utils/arrowHandle)
Properties
initial
initial:
number|null
Defined in: packages/free-drawing/src/@types/shapes.ts:109
Coordinate of the middle segment of the elbow arrow without elbowMid (the handle snaps to it), null without
vertical
vertical:
boolean
Defined in: packages/free-drawing/src/@types/shapes.ts:107
Middle segment of an elbow arrow vertical (moved along x), else horizontal; unused for curves
BoundEnd
BoundEnd =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:32
Arrow end linked to a shape: at a side, or on its outline aiming at the other end
Properties
anchor?
optionalanchor?:Anchor
Defined in: packages/free-drawing/src/@types/shapes.ts:36
Side whose middle the end is fixed to, else end on outline
shape
shape:
Node
Defined in: packages/free-drawing/src/@types/shapes.ts:34
Shape the end is linked to
BoundEnds
BoundEnds =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:56
Ends of an arrow from its links (see getBoundEnds of utils/binding), in layer coordinates
Properties
anchors
Defined in: packages/free-drawing/src/@types/shapes.ts:62
Sides of shapes the start and the end are fixed to
boxes
boxes:
EndBoxes
Defined in: packages/free-drawing/src/@types/shapes.ts:64
Boxes of the linked shapes (stroke included), only for elbow arrows: they go around them
end
end:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:60
End of arrow
start
start:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:58
Start of arrow
ElbowLine
ElbowLine =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:89
Line chosen for the middle segment of an elbow arrow (its elbowMid attribute)
Properties
axis
axis:
"x"|"y"
Defined in: packages/free-drawing/src/@types/shapes.ts:91
x for a vertical segment (moved along x), y for a horizontal one
value
value:
number
Defined in: packages/free-drawing/src/@types/shapes.ts:93
Coordinate of the segment on this axis
ElbowSegment
ElbowSegment =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:97
Middle segment of an elbow arrow (between two turns, not at its ends): moved by the handle of the arrow
Properties
index
index:
number
Defined in: packages/free-drawing/src/@types/shapes.ts:99
Index of its first point in the points of the arrow
vertical
vertical:
boolean
Defined in: packages/free-drawing/src/@types/shapes.ts:101
Vertical segment (moved along x), else horizontal
EndBoxes
EndBoxes = [
IRect|undefined,IRect|undefined]
Defined in: packages/free-drawing/src/@types/shapes.ts:51
Boxes of the shapes linked to the start and the end of an arrow (undefined: free end)
FrameChanges
FrameChanges =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:115
Frames entered and left by shapes moved in or out of them
Properties
entered
entered:
Frame[]
Defined in: packages/free-drawing/src/@types/shapes.ts:117
Frames receiving shapes
left
left:
Frame[]
Defined in: packages/free-drawing/src/@types/shapes.ts:119
Frames losing shapes
GridLine
GridLine =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:81
Line of the grid of elbow arrows (see utils/elbow): coordinate and cost of a turn onto it
Properties
cost
cost:
number
Defined in: packages/free-drawing/src/@types/shapes.ts:85
Cost added by a turn onto it: lines in the middle preferred, others only when needed
value
value:
number
Defined in: packages/free-drawing/src/@types/shapes.ts:83
Coordinate of the line: x of a vertical line, y of a horizontal one
LayerIndex
LayerIndex =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:43
Nodes of a layer found in one walk (see indexLayer of utils/boundText): lookups of an operation on many shapes, instead of a search of the layer for each one
Properties
byId
byId:
Map<string,Node>
Defined in: packages/free-drawing/src/@types/shapes.ts:45
Nodes by id (the first one in the layer, as findOne)
texts
texts:
Map<string,Text>
Defined in: packages/free-drawing/src/@types/shapes.ts:47
Texts of shapes by the id of their shape (containerId)
OutlineCrossing
OutlineCrossing =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:12
Point of the outline of a shape on the way from its center to a point (see getOutlinePoint of utils/binding)
Properties
center
center:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:16
Center of the shape, in layer coordinates
point
point:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:14
Outline point, in layer coordinates
stroke
stroke:
number
Defined in: packages/free-drawing/src/@types/shapes.ts:18
Stroke width of rectangles, ellipses and path shapes (0 for shapes checked by their box)
PathOutline
PathOutline =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:22
Outline of a path shape in its own coordinates, for the data it was sampled from (see getPathRings of utils/binding)
Properties
data
data:
string
Defined in: packages/free-drawing/src/@types/shapes.ts:24
Path data sampled
rings
rings:
Vector2d[][]
Defined in: packages/free-drawing/src/@types/shapes.ts:26
One ring of points per subpath, curves sampled, in coordinates of the shape
RecognizedKind
RecognizedKind =
"rect"|"ellipse"|"triangle"|"diamond"|"line"|"arrow"
Defined in: packages/free-drawing/src/@types/shapes.ts:123
Shape recognized in a freehand stroke (see recognizeShape of utils/recognition)
RecognizedShape
RecognizedShape =
object
Defined in: packages/free-drawing/src/@types/shapes.ts:128
Shape recognized in a freehand stroke: drawn by the tool of its kind from start to end, as by a drag
Properties
end
end:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:134
Bottom right corner of its box (closed shapes), end of a line, tip of an arrow
kind
kind:
RecognizedKind
Defined in: packages/free-drawing/src/@types/shapes.ts:130
Kind of shape
start
start:
Vector2d
Defined in: packages/free-drawing/src/@types/shapes.ts:132
Top left corner of its box (closed shapes), start of a line, tail of an arrow