<<>> <> <> <> DIRECTORY Imager, Rope, SF, ViewerClasses; Draw2d: CEDAR DEFINITIONS IMPORTS Imager ~ BEGIN <> VEC: TYPE ~ Imager.VEC; Context: TYPE ~ Imager.Context; ROPE: TYPE ~ Rope.ROPE; Viewer: TYPE ~ ViewerClasses.Viewer; DrawType: TYPE ~ {solid, dashed, dotted}; MarkType: TYPE ~ {cross, x, asterisk, dot, none}; DrawProc: TYPE ~ PROC [ context: Context, -- Imager context clientData: REF ANY ¬ NIL, -- client supplied data whatChanged: REF ANY ¬ NIL, -- as in ViewerOps viewer: Viewer ¬ NIL -- NIL if for Interpress master ]; PixelProc: TYPE ~ PROC [x, y: INTEGER] RETURNS [continue: BOOL ¬ TRUE]; IntegerBox: TYPE ~ RECORD [x, y, w, h: INTEGER]; Zip: TYPE ~ REF ZipRep; ZipRep: TYPE ~ RECORD [ box: SF.Box, rasterDevice: BOOL ¬ FALSE, transform: Imager.Transformation ]; <> BoxFromContext: PROC [context: Context] RETURNS [IntegerBox]; <> ScreenScale: PROC [viewer: Viewer, aspectRatio: REAL ¬ 4.0/3.0] RETURNS [REAL]; <> <> <<>> Clear: PROC [context: Context, color: Imager.Color ¬ Imager.white]; <> <<>> Label: PROC [context: Context, position: VEC, rope: ROPE]; <> <<>> AssureFont: PROC [context: Context]; <> DoWithBuffer: PROC [context: Context, action: PROC, clear: BOOL ¬ TRUE]; <> <> <<>> IPOut: PROC [fileName: ROPE, drawProc: DrawProc, clientData: REF ANY ¬ NIL]; <> <> <> GetZip: PROC [context: Context, zip: Zip ¬ NIL] RETURNS [Zip]; <> <> <> <> <<>> ReleaseZip: PROC [zip: Zip]; <> <> Line: PROC [context: Context, vec0, vec1: VEC, drawType: DrawType ¬ solid, zip: Zip ¬ NIL]; <> <> <> <> <<>> DoWithLine: PUBLIC PROC [vec0, vec1: VEC, pixelProc: PixelProc]; <> <> Mark: PROC [context: Context, position: VEC, markType: MarkType ¬ cross, zip: Zip ¬ NIL]; <> <<>> Square: PROC [context: Context, center: VEC, size: REAL]; <> <<>> Circle: PROC [context: Context, center: VEC, radius: REAL, fill: BOOL ¬ FALSE]; <> <<>> Arrow: PROC [ context: Context, tail, head: VEC, drawType: DrawType ¬ solid, vary: BOOL ¬ TRUE, zip: Zip ¬ NIL]; <> <<>> END.