G2dOutline.mesa
Copyright Ó 1984, 1992 by Xerox Corporation. All rights reserved.
Bloomenthal, July 1, 1992 7:01 pm PDT
DIRECTORY Imager, ImagerColor, ImagerFont, Rope, TiogaAccess;
G2dOutline: CEDAR DEFINITIONS
~ BEGIN
Type Declarations
VEC: TYPE ~ Imager.VEC;
Context: TYPE ~ Imager.Context;
Color: TYPE ~ ImagerColor.Color;
Font: TYPE ~ ImagerFont.Font;
ROPE: TYPE ~ Rope.ROPE;
Reader:
TYPE ~ TiogaAccess.Reader;
TransformProc: TYPE ~ PROC [v: VEC, clientData: REF ANY] RETURNS [xv: VEC];
Procedures to Manipulate Imager Outlines
MakeTransformContext:
PUBLIC PROC [
action: TransformProc,
clientContext: Context,
clientData: REF ANY]
RETURNS [Context];
Return a context such that action will be applied to all Imager paths.
TransformSelected:
PROC [
reader: Reader,
action: TransformProc,
context: Context,
epsilon: REAL ¬ 0.05,
clientData: REF ANY ¬ NIL];
If a section of the reader is currently selected, transform the selection and write to context.
action must NOT be a nested procedure; clientData is passed to it.
epsilon controls the outline subdivision.
TransformRope:
PROC [
text: ROPE,
action: TransformProc,
context: Context,
x, y: REAL ¬ 0.0,
font: Font ¬ NIL,
color: Color ¬ NIL,
epsilon: REAL ¬ 0.05,
clientData: REF ANY ¬ NIL];
Transform the rope, using the given font.
action must NOT be a nested procedure; clientData is passed to it.
epsilon controls the outline subdivision.
END.