Graphics primitives in CLISP

In CLISP 1994-01-07 or newer,

there are some pixel graphics primitives in the SYSTEM package.
They operate on a VGA card.

Similar pixel graphics primitives can be used in the

by use of the small XTERM package available on

This is the description of the PC/VGA graphics primitives:

(SYSTEM::GRAPH-INIT [width [height [colors]]])

initializes the graphics system.


switches the graphics hardware so that the graphics screen is visible. The text screen is activated on any text output.

fills the entire graphics screen with a single color.


returns two values: the actual width and the actual height of the graphics
screen (in pixels).

If (SYSTEM::GRAPH-DIMS) returns the values w and h, then valid screen
coordinates are pairs (x,y) with 0 <= x < w and 0 <= y < h. x=0 denotes the
left edge, y=0 the top edge.


returns the colour of the pixel (x,y).

(SYSTEM::GRAPH-DOT x y color)

sets the colour of the pixel (x,y) to color.

(SYSTEM::GRAPH-BOX x1 y1 x2 y2 color)

draws a box (= filled rectangle) in colour color, the vertices being the pixels

        (x1,y1)   (x2,y1)
        (x1,y2)   (x2,y2)

(SYSTEM::GRAPH-LINE x1 y1 x2 y2 color)

Draws a line in colour color from pixel (x1,y1) to pixel (x2,y2).

(SYSTEM::GRAPH-TEXT x y dir string color)

Paints the text contained in string, starting at (x,y), in colour color,
and returns as values the end coordinates (x,y). dir is the direction:
0 goes to the right, 90 vertically up, 180 to the left, 270 vertically down.

This specification is subject to change.