An arrow has a head, tail, length and width. The head defines the head
style of the arrow. The length, width (or radius for polygon and circle
head styles) define the size of the arrow and tail defines wether it has a
tail and how long it is.
All properties have default values that can be scaled with the scale
property. So a scale of 2 will double the size of the default arrow.
An arrow can be aligned and oriented with align and angle. align
positions the tip, start, tail or middle part of the arrow at (0, 0) in
draw space. This part of the arrow will therefore be at the position
or translation of the transform. angle then gives the arrow some drawn
rotation.
Alignment definitions are:
tip: arrow tip
start: opposite side of tip
mid: mid points between start and tip - useful for polygon, circle
and bar arrows without tails when the head should be on a point, not next
to it
tail: the end of the tail when a tail exists, or where a tail would start
if it doesn't exist.
Setting the tail property to false will draw only the arrow head,
true will draw a tail of length 0, and a tail with a custom length
can be defined with a number. A tail length of 0 will only extend a tail
to the boundaries of the head. A positive tail, will extend it beyond the
boundaries.
For arrow heads that use length and width properties, the length is the
dimension along the line. It includes both the head and the tail, so an arrow
with length 1 and tailLength 0.4 will have a head length of 0.6.
For polygon and circle arrows, only radius and tail are used to
determine the dimension of the arrow (length and width are ignored).
scalenumber — scale the default dimensions of the arrow
lengthnumber — dimension of the arrow head along the line
widthnumber — dimension of the arrow head along the line width
rotationnumber — rotation of the polygon when head = 'polygon'
sidesnumber — number of sides in polygon or circle arrow head
radiusnumber — radius of polygon or circle arrow head
barbnumber — barb length (along the length of the line) of the
barb arrow head
tailWidthnumber — width of the line that joins the arrow - if
defined this will create minimum dimensions for the arrow
tailboolean — true includes a tail in the arrow of
with tailWidth. A number gives the tail a length where 0 will not
extend the tail beyond the boundaries of the head
alignstart | mid | tip | tail — define which part of
the arrow is aligned at (0, 0) in draw space ('tip')
Arrow options object that extends OBJ_Generic (without
drawType) and OBJ_FigurePrimitiveAn arrow has a head, tail, length and width. The
headdefines the head style of the arrow. Thelength,width(orradiusfor polygon and circle head styles) define the size of the arrow andtaildefines wether it has a tail and how long it is.All properties have default values that can be scaled with the
scaleproperty. So ascaleof 2 will double the size of the default arrow.An arrow can be aligned and oriented with
alignandangle.alignpositions the tip, start, tail or middle part of the arrow at (0, 0) in draw space. This part of the arrow will therefore be at thepositionor translation of thetransform.anglethen gives the arrow some drawn rotation.Alignment definitions are:
tip: arrow tipstart: opposite side oftipmid: mid points betweenstartandtip- useful for polygon, circle and bar arrows without tails when the head should be on a point, not next to ittail: the end of the tail when a tail exists, or where a tail would start if it doesn't exist.Setting the
tailproperty tofalsewill draw only the arrow head,truewill draw a tail of length 0, and a tail with a custom length can be defined with anumber. A tail length of 0 will only extend a tail to the boundaries of the head. A positive tail, will extend it beyond the boundaries.For arrow heads that use
lengthandwidthproperties, thelengthis the dimension along the line. It includes both the head and the tail, so an arrow with length 1 and tailLength 0.4 will have a head length of 0.6.For
polygonandcirclearrows, onlyradiusandtailare used to determine the dimension of the arrow (lengthandwidthare ignored).headTypeArrowHead — head style ('triangle')scalenumber— scale the default dimensions of the arrowlengthnumber— dimension of the arrow head along the linewidthnumber— dimension of the arrow head along the line widthrotationnumber— rotation of the polygon whenhead = 'polygon'sidesnumber— number of sides in polygon or circle arrow headradiusnumber— radius of polygon or circle arrow headbarbnumber— barb length (along the length of the line) of the barb arrow headtailWidthnumber— width of the line that joins the arrow - if defined this will create minimum dimensions for the arrowtailboolean—trueincludes a tail in the arrow of withtailWidth. Anumbergives the tail a length where 0 will not extend the tail beyond the boundaries of the headalignstart|mid|tip|tail— define which part of the arrow is aligned at (0, 0) in draw space ('tip')anglenumber— angle the arrow is drawn at (0)Example
Example
Example