DIRECTORY Rope USING [ROPE], Vector2 USING [VEC]; PSImager: CEDAR DEFINITIONS ~ BEGIN Ref: TYPE ~ REF Rep; Rep: TYPE; GSave: PROC [self: Ref]; GRestore: PROC [self: Ref]; GRestoreAll: PROC [self: Ref]; InitGraphics: PROC [self: Ref]; SetLineWidth: PROC [self: Ref, width: REAL]; CurrentLineWidth: PROC [self: Ref] RETURNS [REAL]; LineCap: TYPE ~ {butt, round, square}; SetLineCap: PROC [self: Ref, cap: LineCap]; CurrentLineCap: PROC [self: Ref] RETURNS [LineCap]; LineJoin: TYPE ~ {miter, round, bevel}; SetLineJoin: PROC [self: Ref, join: LineJoin]; CurrentLineJoin: PROC [self: Ref] RETURNS [LineJoin]; SetMiterLimit: PROC [self: Ref, limit: REAL]; CurrentMiterLimit: PROC [self: Ref] RETURNS [REAL]; Dash: TYPE ~ REF DashRep; DashRep: TYPE ~ RECORD [offset: REAL, array: SEQUENCE len: NAT OF REAL]; DashArray: TYPE ~ REF DashArrayRep; SetDash: PROC [self: Ref, dash: Dash]; -- ***** CurrentDash: PROC [self: Ref] RETURNS [Dash]; -- ***** SetFlat: PROC [self: Ref, flat: REAL]; CurrentFlat: PROC [self: Ref] RETURNS [REAL]; SetGray: PROC [self: Ref, gray: REAL]; CurrentGray: PROC [self: Ref] RETURNS [REAL]; HSBColor: TYPE ~ RECORD [hue, sat, brt: REAL]; SetHSBColor: PROC [self: Ref, color: HSBColor]; CurrentHSBColor: PROC [self: Ref] RETURNS [HSBColor]; RGBColor: TYPE ~ RECORD [red, green, blue: REAL]; SetRGBColor: PROC [self: Ref, color: RGBColor]; CurrentRGBColor: PROC [self: Ref] RETURNS [RGBColor]; InitMatrix: PROC [self: Ref]; DefaultMatrix: PROC [self: Ref] RETURNS [Matrix]; -- ***** CurrentMatrix: PROC [self: Ref] RETURNS [Matrix]; -- ***** SetMatrix: PROC [self: Ref, matrix: Matrix]; -- ***** VEC: TYPE ~ Vector2.VEC; Translate: PROC [self: Ref, t: VEC]; Scale: PROC [self: Ref, s: VEC]; Rotate: PROC [self: Ref, angle: REAL]; Concat: PROC [self: Ref, matrix: Matrix]; Transform: PROC [self: Ref, p: VEC]; DTransform: PROC [self: Ref, d: VEC]; ITransform: PROC [self: Ref, p: VEC]; IDTransform: PROC [self: Ref, d: VEC]; NewPath: PROC [self: Ref]; CurrentPoint: PROC [self: Ref] RETURNS [VEC]; MoveTo: PROC [self: Ref, p: VEC]; RMoveTo: PROC [self: Ref, d: VEC]; LineTo: PROC [self: Ref, p: VEC]; RLineTo: PROC [self: Ref, d: VEC]; Arc: PROC [self: Ref, p: VEC, r: REAL, ang1, ang2: REAL]; ArcN: PROC [self: Ref, p: VEC, r: REAL, ang1, ang2: REAL]; ArcTo: PROC [self: Ref, p1, p2: VEC, r: REAL] RETURNS [t1, t2: VEC]; CurveTo: PROC [self: Ref, p1, p2, p3: VEC]; RCurveTo: PROC [self: Ref, d1, d2, d3: VEC]; ClosePath: PROC [self: Ref]; FlattenPath: PROC [self: Ref]; ReversePath: PROC [self: Ref]; StrokePath: PROC [self: Ref]; CharPath: PROC [self: Ref, string: ROPE, outline: BOOL]; ClipPath: PROC [self: Ref]; Box: TYPE ~ RECORD [ll, ur: VEC]; PathBox: PROC [self: Ref] RETURNS [Box]; PathForAll: PROC [self: Ref, move: PROC [p: VEC], line: PROC [p: VEC], curve: PROC [p1, p2, p3: VEC], close: PROC, ]; InitClip: PROC [self: Ref]; Clip: PROC [self: Ref, eo: BOOL _ FALSE]; ErasePage: PROC [self: Ref]; Fill: PROC [self: Ref, eo: BOOL _ FALSE]; Stroke: PROC [self: Ref]; Image: PROC [self: Ref, width, height: INT, bitsPerSample: INT, matrix: Matrix, stream: STREAM]; -- ***** ImageMask: PROC [self: Ref, width, height: INT, invert: BOOL, matrix: Matrix, stream: STREAM]; -- ***** Font: TYPE ~ REF FontRep; FontRep: TYPE; SetFont: PROC [self: Ref, font: Font]; -- ***** CurrentFont: PROC [self: Ref] RETURNS [Font]; -- ***** Show: PROC [self: Ref, string: ROPE]; AShow: PROC [self: Ref, a: VEC, string: ROPE]; WidthShow: PROC [self: Ref, c: VEC, char: CHAR, string: ROPE]; AWidthShow: PROC [self: Ref, c: VEC, char: CHAR, a: VEC, string: ROPE]; KShow: PROC [self: Ref, proc: PROC, string: ROPE]; -- ***** StringWidth: PROC [self: Ref, string: ROPE] RETURNS [VEC]; END. VPSImager.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Doug Wyatt, May 6, 1987 3:49:14 pm PDT Graphics state operators save graphics state restore graphics state restore to bottommost graphics state reset graphics state parameters set line width return current line width set shape of ends for stroke return current line cap set shape of corners for stroke return current line join set miter length limit return current miter limit set dash pattern for stroking return current dash pattern set flatness tolerance return current flatness set color to gray value from 0 (black) to 1 (white) return current gray set color given hue, saturation, brightness return current color hue, saturation, brightness set color given red, green, blue return current color red, green, blue Screen: TYPE ~ REF ScreenRep; ScreenRep: TYPE ~ RECORD [...]; SetScreen: PROC [self: Ref, screen: Screen]; -- ***** set halftone screen CurrentScreen: PROC [self: Ref] RETURNS [Screen]; -- ***** return current halftone screen Coordinate system and matrix operators set CTM to device default return device default matrix return CTM replace CTM by matrix translate user space by t scale user space by s rotate user space by angle degrees replace CTM by matrix x CTM transform point p by CTM transform distance d by CTM inverse transform point p by CTM inverse transform distance d by CTM Path construction operators initialize current path to be empty return current point coordinates set current point to p relative moveto append straight line to p relative lineto append counterclockwise arc append clockwise arc append tangent arc append Bezier cubic section relative curveto connect subpath back to its starting point convert curves to sequences of straight lines reverse direction of current path compute outline of stroked path append character outline to current path set current path to clipping path return bounding box of current path enumerate current path set clip path to device default establish new clipping path; if eo, use even-odd rule Painting operators paint current page white fill current path with current color; if eo, use even-odd rule draw line along current path render sampled image onto current page render mask onto current page Character and font operators set font dictionary return current font dictionary print characters of string on page add a to width of each char while showing string add c to width of char while showing string combined effects of ashow and widthshow execute proc between characters shown width of string in current font Κί˜codešœ ™ Kšœ<™K™—šŸœœ ˜K™K™—š Ÿœœœœœ ˜iK™&K™—š Ÿ œœœ œœ ˜gK™K™——™Kšœœœ ˜šœ œ˜K˜—šŸœœ ˜/K™K™—šŸ œœ œ  ˜6K™K™—šŸœœœ˜%K™"K™—šŸœœœ œ˜.K™0K™—š Ÿ œœœœ œ˜>K™+K™—š Ÿ œœœœœ œ˜GK™'K™—š Ÿœœœ œ ˜;K™%K™—š Ÿ œœœœœ˜:K™K™—K™—Kšœ˜J˜—…—z!―