DIRECTORY Imager, IO, Rope, Vector2; Draw2d: CEDAR DEFINITIONS ~ BEGIN VEC: TYPE ~ Vector2.VEC; MarkType: TYPE ~ {cross, x, asterisk, dot, none}; DrawType: TYPE ~ {solid, dash, dot}; InitFont: PROC [context: Imager.Context]; Label: PROC [context: Imager.Context, p: VEC, rope: Rope.ROPE]; DoWithBuffer: PROC [context: Imager.Context, action: PROC, w, h: INTEGER]; DoNoBuffer: PROC [context: Imager.Context, action: PROC, w, h: INTEGER]; ShowList: PUBLIC PROC [list: LIST OF Vector2.VEC, context: Imager.Context]; ClearContext: PROC [context: Imager.Context, x, y, w, h: INTEGER]; Mark: PROC [context: Imager.Context, p: VEC, type: MarkType _ cross]; Draw: PROC [context: Imager.Context, p0, p1: VEC, type: DrawType _ solid]; Solid: PROC [context: Imager.Context, p0, p1: Vector2.VEC]; Dot: PROC [context: Imager.Context, p0, p1: Vector2.VEC]; Dash: PROC [context: Imager.Context, p0, p1: Vector2.VEC]; Arrow: PROC [context: Imager.Context, head, tail: Vector2.VEC]; Square: PROC [context: Imager.Context, x, y, size: REAL]; Debug: PROC [s: IO.STREAM]; END. úDraw2d.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bloomenthal, February 25, 1986 7:31:58 pm PST Set the font for subsequent calls to Label. Combines Imager.SetXY and Imager.ShowRope. Combine SetFont and ImagerOps.DoWithBuffer. Combine SetFont and ImagerOps.DoSaveClipRectangleI. Draw a list of 2D points. Clears a context to white. Draw a mark at p. Draw between p0 and p1. Draw a solid line between p0 and p1, using Bresenham algorithm. Draw a dotted line between p0 and p1, much faster than Dash or Imager.MaskVector. Draw a dashed line between p0 and p1. Draw an arrow from tail to head, with arrowhead at head. If vary, the arrowhead size varies Draw a solid square at [x, y].. Set a global stream for debugging. ʘšœ ™ Jšœ Ïmœ1™