1.5 class arrow

Class arrow defines an arrow-head. Normally, arrows are connected to subclasses of class joint (class line, class arc, class path and class bezier_curve), but arrows may also be used as stand-alone graphical objects. An arrow is determined by the following parameters:

1.5.1 Instance variables

arrow <- fill: colour|{foreground,background}*
If not equal to @nil, the triangle is filled with this pattern.

Defaults: @nil

See also
bitmap-status
arrow-right: point
Right-end of base.
arrow-left: point
Computed value to speed up redraw if the parameters of the arrow has not changed.
arrow <- length: num
Distance in pixels from the arrow<-tip to the baseline of the triangle. See also arrow<-wing.
arrow <- reference: point
Imaginary point where the arrow points to. Only the direction from arrow<-tip is considered; not the distance. arrow<-reference and arrow<-tip may not be at the same location.
arrow <- style: {open,closed}
If open, the baseline of the triangle is not painted.
arrow <- tip: point
Location of the arrow head. Together with arrow<-reference this determines the direction into which the arrow points.
arrow <- wing: num
Length of the baseline.

1.5.2 Send methods

arrow ->compute:
Compute -left, -right and graphical<-area from the arrow<-tip, arrow<-reference, arrow<-length and arrow<-wing to speed up redraw.
arrow ->geometry: x=[int], y=[int], width=[int], height=[int]
Ignores the width and height arguments. Compares the x and y with the current graphical<-area and moves the a arrow by calling arrow->points such the graphical<-area will match the specified x and y.
arrow ->initialise: length=[num], wing=[num], style=[{open,closed}], fill=[colour]*
Initialise an arrow object. length is the length from the arrow-head to the back of the wing. wing is the distance between the two wing-tips. A default arrow reads the following values from associated class-variables:
arrow<-length Tip to wing length
arrow<-wing Wing-tip distance
arrow<-fill How it is filled
arrow<-style {open,closed}
arrow ->reference_x: num
Inherits description from: arrow<-reference_x
arrow ->reference_y: num
Inherits description from: arrow<-reference_x

1.5.3 Get methods

arrow <-reference_y: -> num
arrow <-reference_x: -> num
Directly operate on X- or Y- component of the arrow<->reference.