Oberon || Library || Module Index || Search Engine || Definition || Module
(* graphics characters *) CONST verticalLine = 0; CONST horizontalLine = 1; CONST lowerRightCorner = 2; CONST upperRightCorner = 3; CONST upperLeftCorner = 4; CONST lowerLeftCorner = 5; CONST cross = 6; CONST leftTee = 7; CONST rightTee = 8; CONST bottomTee = 9; CONST topTee = 10; CONST chars = 11; (* character sets *) CONST standard = 0; graphics = 1;
TYPE GraphicsChar = RECORD set: SHORTINT; char: CHAR; END; TYPE CharSet = ARRAY chars OF GraphicsChar; (* graphics charset *)
TYPE SetProc = PROCEDURE (s: Streams.Stream; charset: SHORTINT);
PROCEDURE Init(s: Streams.Stream; charset: CharSet; setCharset: SetProc); PROCEDURE Draw(s: Streams.Stream; char: SHORTINT); PROCEDURE HLine(s: Streams.Stream; line, column, length: INTEGER); PROCEDURE VLine(s: Streams.Stream; line, column, length: INTEGER); PROCEDURE Box(s: Streams.Stream; line, column, lines, columns: INTEGER);
Init has to be called by the underlying terminal implementation with the set of graphics characters in charset and a procedure for changing character sets in setCharset. If Init was not called, TermLineGraphics uses a default set of non-graphics characters for drawing.
Draw draws a single graphics character.
HLine draws a horizontal line.
VLine draws a vertical line.
Box draws a rectangle.
The drawing procedures do not test for valid screen coordinates.
Oberon || Library || Module Index || Search Engine || Definition || Module