File: PadGraphics.mesa
Last edited by Bier on May 31, 1984 4:30:06 pm PDT
Author: Eric Bier on July 29, 1984 2:31:43 pm PDT
Contents: Simple 2d graphics package for the scratchpad
PadGraphics: DEFINITIONS =
BEGIN
Path: TYPE = SV2d.Path;
Point2d: TYPE = SV2d.Point2d;
Polygon: TYPE = SV2d.Polygon;
Vector2d: TYPE = SV2d.Vector2d;
ScreenToPad: PROC [screenPoint: Point2d, origin: Point2d, scalar: REAL ← 1] RETURNS [padPoint: Point2d];
PadToScreen: PROC [padPoint: Point2d, origin: Point2d, scalar: REAL ← 1] RETURNS [screenPoint: Point2d];
MoveTo: PROC [dc: Imager.Context, padPoint: Point2d, origin: Point2d];
DrawTo: PROC [dc: Imager.Context, padPoint: Point2d, origin: Point2d];
MirrorMoveTo: PROC [dc: Imager.Context, padPoint: Point2d, origin: Point2d];
MirrorDrawTo: PROC [dc: Imager.Context, padPoint: Point2d, origin: Point2d];
DrawPathNeighborHood: PROC [dc: Imager.Context, path: Path, index: NAT, origin: Point2d];
MirrorDrawPathNeighborHood: PROC [dc: Imager.Context, path: Path, index: NAT, origin: Point2d];
DrawPolyNeighborHood: PROC [dc: Imager.Context, poly: Polygon, index: NAT, origin: Point2d];
MirrorDrawPolyNeighborHood: PROC [dc: Imager.Context, poly: Polygon, index: NAT, origin: Point2d];
DrawPath: PROC [dc: Imager.Context, path: Path, origin: Point2d, scalar: REAL ← 1];
DrawPolygon: PROC [dc: Imager.Context, poly: Polygon, origin: Point2d, scalar: REAL ← 1];
CrossHairs: PROC [dc: Imager.Context, origin: Point2d];
DrawSquare: PROC [dc: Imager.Context, side: REAL, center: Point2d, origin: Point2d];
MirrorDrawSquare: PROC [dc: Imager.Context, side: REAL, center: Point2d, origin: Point2d];
Draw2dVector: PROC [dc: Imager.Context, vec: Vector2d, at: Point2d, origin: Point2d];
Circle: PROC [dc: Imager.Context, originX, originY, radius: REAL];
LineSandwich: PROC [dc: Imager.Context, fromX, fromY, toX, toY: REAL];
END.