DEFINITION MODULE GKSDraw;

(*
    Title: 	Graphical Kernel System Client Drawing Interface
    LastEdit:	"Tue Feb 26 14:59:51 1985"
    Author: 	jd
		Cambridge University Computer Laboratory
*)

(* These procedures form the GKS interface for the drawing primitives.
    Procedures for drawing lines, markers, text, pixels and for area filling
    are defined here, as well as the procedures for defining the first of
    the coordinate transformations performed by GKS, normalization. The
    procedure Gdp is an "escape", a general drawing primitive intended to 
    address features of a workstation not modelled directly by GKS.

    The "Insert" procedures deal with primitives which have been
    normalized, but have yet to be stored in the open segment and sent to
    all active workstations. This is the place where an InsertSegment
    puts its primitives back into the viewing pipeline.
*)
FROM GKSTypes IMPORT GDPCODE;

FROM Vector IMPORT RVEC, RBOX;

FROM SYSTEM IMPORT WORD;

EXPORT QUALIFIED
    Line, PolyLine, Marker, PolyMarker, Text, Fill, Pixels, Gdp, 
    InsertLine, InsertMarker, InsertText, InsertFill, 
    InsertPixels, InsertGdp;

    (********** External Declarations For GKS Clients **********)

PROCEDURE PolyLine (count: INTEGER; VAR points: ARRAY OF RVEC);
PROCEDURE Line (VAR from, to: RVEC);
        (* the simple case of PolyLine *)
PROCEDURE PolyMarker (count: INTEGER; VAR points: ARRAY OF RVEC);
PROCEDURE Marker (VAR at: RVEC);
PROCEDURE Text (VAR at: RVEC; VAR text: ARRAY OF CHAR);
PROCEDURE Fill (count: INTEGER; VAR points: ARRAY OF RVEC);
PROCEDURE Pixels (in: RBOX; rows, columns: INTEGER;
        VAR pixels: ARRAY OF CARDINAL);
PROCEDURE Gdp (function: GDPCODE; data: WORD; count: INTEGER;
        points: ARRAY OF RVEC);

    (********** Internal Declarations for GKS only **********)

PROCEDURE InsertLine (high: INTEGER; VAR points: ARRAY OF RVEC);
PROCEDURE InsertMarker (high: INTEGER; VAR points: ARRAY OF RVEC);
PROCEDURE InsertText (at: RVEC; high: INTEGER; VAR text: ARRAY OF CHAR);
PROCEDURE InsertFill (high: INTEGER; VAR points: ARRAY OF RVEC);
PROCEDURE InsertPixels (in: RBOX; rowhigh, columnhigh: INTEGER;
        VAR pixels: ARRAY OF CARDINAL);
PROCEDURE InsertGdp (function: GDPCODE; data: WORD; high: INTEGER; 
        VAR points: ARRAY OF RVEC);


END GKSDraw.
