B Summary ofVogleFunctions 319
Axes and projections
The projection routines define a new transformation matrix and consequently new
world units. Parallel projections are defined by the functionsorthoandortho2.
Perspective projections are defined by the functionsperspectiveandwindow.
ortho (left, right, bottom, top, near, far) Define x, y, and z clipping planes
ortho2 (left, right, bottom, top) Define x and y clipping planes
perspective (fov, aspect, near, far) Specify perspective
for field of view (fov), aspect
ratio (aspect), and distance
from the eye to the near and far
clipping planes
window (left, right, bot, top, near, far) Viewing pyramid
clipping (onoff) Turn clipping on or off;
setonoffto0toturnoff
Text
font (fontname) Set the current font
int numchars() Return number of characters
in the current SOFTWARE font
textsize (width, height) Set maximum size of a character
in the current SOFTWARE font
Negative size gives backward characters
textang (ang) Set the SOFTWARE text angle
fixedwidth (onoff) Turn fixed-width mode on or off
for a SOFTWARE font
centertext (onoff) Turns center-text mode on or off
for SOFTWARE a font
getcharsize (c, width, height) Get the width and height of a character
getfontsize (width, height) Get maximum width and height
of a character
drawchar (c) Draw the character c
and update the current position
drawstr (str) Drawthetextinstring
at the current position
float strlength (str) Return the length of the stringsrt
boxtext (x, y, l, h, str) Draw the SOFTWARE stringstr
so that it fits in the imaginary box
boxfit (l, h, nchars) Set scale for text so that a string
of the biggest characters in the
SOFTWARE font will fit inside anl×hbox,
wherelandhare real values