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) 13sub subnamex size mdatagsaveset just left font pszd hei sizet$ = "\char{102}"rmove -twidth(t$)/2 -theight(t$)/2write t$grestoreend sub! save font and x,y! centers marker! restores font and x,yThe second parameter can be supplied using the mdata command when drawing a graph, this givesthe marker subroutine a value from another dataset to use to draw the marker. For example themarker could vary in size, or angle, with every one plotted.d3 marker myname mdata d4define markername fontname scale dx dyThis command defines a new marker, from any font, it is automatically centered but can be adjustedusing dx,dy. e.g.defmarker hand pszd 43 1 0 0draw name.point [arg1 ... argn] [name name]Draws a named object block that has been previously defined using a “begin/end object” (p. 10)construct. The object is drawn such that the point indicated by the first argument of the drawcommand appears at the current position. The point can be any (hierarchically) named point onthe object and may include the justify options defined for the join command (p. 14).If the object block has parameters (similar to a subroutine) then these parameters can be given asarg1 . . . argn.The “draw” command names the object using the same name as the name of the object block bydefault. An alternative name can be supplied using its “name” option.See Sec. 7.1.2 for a detailed explanation of this command with examples.ellipse dx dy [options]This command draws an ellipse with the diameters dx and dy in the x and y directions, respectively.The options are the same as the circle command.elliptical arc dx dy theta1 theta2 [options]This command is similar to the arc command except that it draws an elliptical arc in the clockwisedirection with the diameters dx and dy in the x and y directions, respectively. theta1 and theta2are the start and stop angle, respectively. The options are the same as for the arc command.The command elliptical narc is identical but draws the arc in the clockwise direction.important when constructing a path.for var = exp1 to exp2 [step exp3] command [...] next varThe for ... next structure lets you repeat a block of statements a number of times.<strong>GLE</strong> sets var equal to exp1 and then repeats the following steps.This is• If var is greater than exp2 then <strong>GLE</strong> commands are skipped until the line after the nextstatement.• The value exp3 is added to var.• The statements between the for and next statement are executed.If exp1 is greater than exp2 then the loop is not executed.for x = 1 to 4 step 0.5amove x 1aline 5-x 2next x

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

Saved successfully!

Ooh no, something went wrong!