Reference Manual
Note
This page is a work in progress. The complete reference manual in PDF format can be found here gle-manual.pdf. In addition, an excellent GLE users guide is available online.
Drawing Commands
! [optional text]
Indicates the start of a comment. GLE ignores everything from the exclamation point to the end of the line. This works both in GLE scripts and in data files read in utilizing the data
command within a graph block.
amove x y
Changes the current point to the absolute coordinates. Coordinates are specified in centimeters.
rmove x y
Changes the current point to the relative position from the current point.
aline x y [arrow start] [arrow end] [arrow both] [curve a1 a1 d1 d2]
Draws a line from the current point to the absolute coordinates x,y
, which then becomes the new current point. The arrow qualifiers
are optional, they draw arrows at the start or end of the line. The size of the arrow is proportional to the current font height.
If the curve option is given, then a Bezier curve is drawn instead of a line. The first control point is located at a distance d1
and angle a1
from the current point and the second control point is located at distance d2
and angle a2
from x,y
.
rline x y [arrow start] [arrow end] [arrow both] [curve a1 a1 d1 d2]
Draws a line from the current point to the relative position from the current point. Options are the same as aline
! line_example.gle
size 4 4
amove 1 1
aline 2 2
aline 2 3 arrow end
amove 1 2
aline 2 3 curve 45 90 1 2
!
amove 3 1
aline 3.5 3.5 arrow both
amove 0.5 2.0
aline 0.5 0.5 arrow start
arc radius a1 a2 [arrow end] [arrow start] [arrow both]]
Draws an arc of a circle in the counter-clockwise direction, centered at the current point, of radius radius
, starting at angle a1
and finishing at angle a2
. Angles
are specified in degrees. Zero degrees is at three o'clock and Ninety degrees is at twelve o'clock.
narc radius a1 a2 [arrow end] [arrow start] [arrow both]]
Identical to `arc draws the arc in the clockwise direction. This is important when constructing a path.
! arc_example.gle
size 5 3
amove 1.5 1.5
set lwidth 0.05
arc 1 0 45 arrow end
arc 1 90 135
arc 1 180 345
arc 0.5 -90 0
arc 0.5 10 100
amove 3.75 1.5
narc 1 0 45 arrow end
narc 0.75 90 -45 arrow both
arcto x1 y1 x2 y2 rad
Draws a line from the current point to (x1,y1)
then to (x2,y2)
but fits an arc of radius rad
joining the two vectors instead of a vertex at the point (x1,y1)
.
! arcto_example.gle
size 3 3
amove 0.5 0.5
rline 1 0
set lwidth .1
arcto 2 0 -1 1 .5
set lwidth 0
rline -1 1