CONTENTS | PREV | NEXT
9E. graphics support functions
------------------------------

All graphics support functions that do not explicitly ask for a rastport,
make use of the system-variable 'stdrast'. It is automatically defined by
the last call to OpenW() or OpenS(), and is set to NIL by CloseW() and
CloseS(). Calling these routines while stdrast is still NIL is legal.
stdrast may be manually set by SetStdRast() or stdrast:=myrast

	Plot(x,y,colour=1)

Draws a single dot on your screen/window in one of the colours available.
colour ranges from 0-255, or 0-31 on pre-AGA machines.

	Line(x1,y1,x2,y2,colour=1)

Draws a line

	Box(x1,y1,x2,y2,colour=1)

Draws a box

	Colour(foreground,background=0)

sets the colours for all graphics functions (from the library) that
do not take a colour as argument. This is the colour *register*
(i.e 0-31) and not colour *value*
NOTE: functions that have "colour" as an argument, change the Apen
of stdrast.

	TextF(x,y,formatstring,args,...)

exactly the same function as WriteF(), only outputs to some (x,y) on
your stdrast, instead of stdout. (see  9A , WriteF() and strings in the language
reference). returns the length of the resulting string.

	oldrast:=SetStdRast(newrast)

changes the output rastport of the E graphics functions

	SetTopaz(size=8)

[obsolete: don't use]
lets you set the font of the rastport "stdrast" to topaz. size is 8 or 9.
Only to be used as last resort if you can't support font-sensitivity.

	SetColour(screen,colourreg,r,g,b)

set colour register (0..255) of screen to certain RGB values.
each rgb value has a range of 0..255, i.e. 24bit colour. this
function will automatically rescale to 12bit colour if no AGA
is present, and also use the correct function.