-- File CIFVersatecUtilsDefs.mesa
-- Written by Martin Newell, June 1980
-- Last updated: July 21, 1981 2:38 PM

DIRECTORY

CIFVersatecTypeDefs: FROM "CIFVersatecTypeDefs" USING [Edge];

CIFVersatecUtilsDefs: DEFINITIONS =

BEGIN OPEN CIFVersatecTypeDefs;

VStripeWidth: CARDINAL = 6944; --***pixels per scanline

VersatecNextStripe: PUBLIC PROCEDURE;

OutputStripesUntil: PUBLIC PROCEDURE[y: REAL];

VersatecMakeEdge: PUBLIC PROCEDURE [xstart,ystart,xend,yend: REAL, up: BOOLEAN]
RETURNS[edge: Edge];

VersatecAllocateStripe: PUBLIC PROCEDURE;

VersatecOutStripe: PUBLIC PROCEDURE;

VersatecClearStripe: PUBLIC PROCEDURE[overlap: BOOLEAN];
--If overlap then copy line number VStripeHeight to line number 0 and
-- clear lines 1..VStripeHeight inclusive, otherwise
-- clear lines 0..VStripeHeight inclusive

LoadStipple: PUBLIC PROCEDURE[layer:CARDINAL, v0,v1,v2,v3: CARDINAL];

AllocateVerticalEdge: PUBLIC PROCEDURE RETURNS[Edge];

AllocateObliqueEdge: PUBLIC PROCEDURE RETURNS[Edge];

FreeEdge: PUBLIC PROCEDURE[edge: Edge];

EdgeLessThan: PUBLIC PROCEDURE[e1,e2: Edge, y: REAL] RETURNS[BOOLEAN];
--orders up/down within slope within x

XatY: PUBLIC PROCEDURE[edge: Edge, y: REAL] RETURNS[x: REAL];

InitVersatecOut: PUBLIC PROCEDURE[fileName: STRING, height: CARDINAL];

FinishVersatecOut: PUBLIC PROCEDURE[y: REAL];

HorLine: PUBLIC PROCEDURE[xleft,xright,y: REAL];

DrawTrap: PUBLIC PROCEDURE[left: Edge, ystart: REAL, right: Edge, yend: REAL, layer: CARDINAL];


END.