GGShapes.mesa
Author: Eric Bier on June 7, 1985 4:47:32 pm PDT
Last edited by Bier on February 10, 1987 1:40:47 pm PST
Contents: Predefined shapes for use in Gargoyle (e.g. squares for control points).
Pier, August 25, 1986 5:05:57 pm PDT
DIRECTORY
GGBasicTypes, GGInterfaceTypes, Imager, ImagerTransformation;
GGShapes: CEDAR DEFINITIONS = BEGIN
Circle: TYPE = GGBasicTypes.Circle;
Line: TYPE = GGBasicTypes.Line;
Point: TYPE = GGBasicTypes.Point;
Vector: TYPE = GGBasicTypes.Vector;
SelectionClass: TYPE = GGInterfaceTypes.SelectionClass;
DrawRectangle: PROC [dc: Imager.Context, loX, loY, hiX, hiY: REAL, strokeWidth: REAL ← 1.0];
Draws the indicated rectangle (not filled).
DrawFilledRect: PROC [dc: Imager.Context, point: Point, side: REAL];
The left-hand corner of the rect is on point.
DrawSquare: PROC [dc: Imager.Context, center: Point, side: REAL, strokeWidth: REAL ← 1.0];
DrawCaret: PROC [dc: Imager.Context, point: Point];
DrawAnchor: PROC [dc: Imager.Context, point: Point];
DrawPlus: PROC [dc: Imager.Context, center: Point];
Draws a side x side square centered on center.
DrawSpot: PROC [dc: Imager.Context, point: Point];
Draws a one-pixel square with lower left corner at point.
DrawLine: PROC [dc: Imager.Context, line: Line, clippedBy: Imager.Rectangle, strokeWidth: REAL ← 1.0];
Draws a line all the way across the screen.
DrawLittleLine: PROC [dc: Imager.Context, line: Line, point: Point];
Draw a short line (1 inch) centered on point, parallel to line.
DrawCircle: PROC [dc: Imager.Context, circle: Circle];
DrawJoint: PROC [dc: Imager.Context, point: Point];
DrawCP: PROC [dc: Imager.Context, point: Point];
DrawSelectedJoint: PROC [dc: Imager.Context, point: Point, selectClass: SelectionClass];
DrawArrow: PROC [dc: Imager.Context, tip: Point, base: Point, strokeWidth: REAL];
ArrowSize: PROC [strokeWidth: REAL] RETURNS [height, halfWidth: REAL];
The arrowhead will fit in a box of size height by (halfWidth*2).
END.
Pier, December 5, 1985 10:19:58 am PST
changes to: removed camera from defs.