--File: MergeDefs.mesa -- Written by Maureen Stone, October 1980 -- based on Polygon, Written by Martin Newell, May 1980 -- Last updated: October 31, 1980 6:32 PM DIRECTORY PointDefs: FROM "PointDefs"; MergeDefs: DEFINITIONS = BEGIN AreaDescriptor: TYPE = POINTER TO AreaBlock; AreaCreate: PUBLIC PROCEDURE RETURNS[area: AreaDescriptor]; -- Create new polygon AreaNewBox: PUBLIC PROCEDURE[area: AreaDescriptor, tl,br: PointDefs.ScrPt,z: INTEGER]; -- Add box to area AreaGenerate: PUBLIC PROCEDURE[area: AreaDescriptor, outputBox: PROCEDURE[tl,br: PointDefs.ScrPt, z: INTEGER]]; -- Generate the area defined up to last AreaNewBox -- This procedure AreaDestroys the area, which therefore is no longer valid AreaDestroy: PUBLIC PROCEDURE[area: AreaDescriptor]; -- Destroy area -- Internal types Edge: TYPE = POINTER TO EdgeRecord; EdgeRecord: TYPE = RECORD[ next: Edge, x: INTEGER, ystart: INTEGER, yend: INTEGER, z: INTEGER, --an indication of overlap order. z constant for whole box lastouty: INTEGER, --y value where edge of deferred box was last output mate: Edge, --other edge making up a deferred box up: BOOLEAN, --TRUE if edge defined in increasing y flagout: BOOLEAN --TRUE if edge will need to be output at ycurr ]; AreaBlock: TYPE = RECORD[ edgeList: Edge, --unprocessed edges edgeListEl: Edge, --last edge added to EdgeList activeList: Edge --edges being processed ]; END.(635)\206b9B24b14B32b10B73b10B98b12B235b11B78b4B32b10B400b9B