12.07.2015 Views

GLE User Manual - Fedora Project Packages GIT repositories

GLE User Manual - Fedora Project Packages GIT repositories

GLE User Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.2. GRAPHICS PRIMITIVES (IN DETAIL) 9aline x y [arrow start] [arrow end] [arrow both] [curve α1 α2 d1 d2]Draws a line from the current point to the absolute coordinates (x,y), which then becomes the newcurrent 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 pointis located at a distance d1 and angle α1 from the current point and the second control point islocated at distance d2 and angle α2 from (x,y).amove x yChanges the current point to the absolute coordinates (x,y).arc radius a1 a2 [arrow end] [arrow start] [arrow both]Draws an arc of a circle in the anti-clockwise direction, centered at the current point, of radiusradius, starting at angle a1 and finishing at angle a2. Angles are specified in degrees. Zero degreesis at three o’clock and Ninety degrees is at twelve o’clock.arc 1.2 20 45The command narc is identical but draws the arc in the clockwise direction. This is important whenconstructing a path.amove .5 .5rline 1 .5 arrow endarc 1 10 160arc .5 -90 0arcto x1 y1 x2 y2 radDraws a line from the current point to (x1,y1) then to (x2,y2) but fits an arc of radius rad joiningthe two vectors instead of a vertex at the point (x1,y1).amove 1.5 .5rline 1 0set lwidth .1arcto 2 0 -1 1 .5set lwidth 0rline -1 1begin block name ... end block nameThere are several block structured commands in <strong>GLE</strong>. Each begin must have a matching end.Blocks which change the current graphics state (e.g. scale, rotate, clip etc) will restore whateverthey change at the end of the block. Indentation is optional but should be used to make the <strong>GLE</strong>program easier to read.begin box [fill pattern] [add gap] [nobox] [name xyz] [round val]Draws a box around everything between begin box and end box. The option add adds a marginof margin cm to each side of the box to make the box slightly larger than the area defined by thegraphics primitives in the begin box . . . end box group (to leave a gap around text for example).The option nobox stops the box outline from being drawn.The name option saves the coordinates of the box for later use with among others the join command.If the round option is used, a box with rounded corners will be drawn.begin box add 0.2begin box fill gray10 add 0.2 round .3text Johnend boxend boxJohn

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!