ImagerDefault.mesa
Last changed by:
Doug Wyatt, November 23, 1983 1:52 pm
Michael Plass, February 6, 1984 4:59:12 pm PST
DIRECTORY
Imager,
ImagerBasic,
ImagerPrivate;
ImagerDefault: CEDAR DEFINITIONS
= BEGIN
Context: TYPE = Imager.Context;
FONT: TYPE = Imager.FONT;
Color: TYPE = ImagerBasic.Color;
ClientClipper: TYPE = ImagerBasic.ClientClipper;
IntPair: TYPE = ImagerBasic.IntPair;
IntRectangle: TYPE = ImagerBasic.IntRectangle;
Pair: TYPE = ImagerBasic.Pair;
PathMapType: TYPE = ImagerBasic.PathMapType;
PixelArray: TYPE = ImagerBasic.PixelArray;
StrokeEnd: TYPE = ImagerBasic.StrokeEnd;
Transformation: TYPE = ImagerBasic.Transformation;
Visibility: TYPE = ImagerBasic.Visibility;
Name: TYPE = ImagerPrivate.Name;
State: TYPE = ImagerBasic.State;
Get state:
iget -> [any]
getcp -> [x, y]
getcprounded -> [x, y]
Set state:
iset[x]
setgray[f]
setfont[n]
Read and set state:
concatt[m]
move[]
trans[]
setxy[x, y]
setxyrel[x, y]
setxrel[x]
setyrel[y]
startunderline[]
clipoutline[outline]
excludeoutline[outline]
cliprectangle[x1, y1, x2, y2]
excluderectangle[x1, y1, x2, y2]
correctmask[]
correctspace[x, y]
setcorrectmeasure[x, y]
setcorrecttolerance[x, y]
space[x]
Read state, write output:
maskfill[outline]
maskstroke[trajectory]
maskstrokeclosed[trajectory]
maskvector[x1, y1, x2, y2]
maskrectangle[x, y, w, h]
maskunderline[dy, h]
masktrapezoidx[x1, y1, x2, x3, y3, x4]
masktrapezoidy[x1, y1, y2, x3, y3, y4]
maskpixel[pixelArray]
Read and set state, write output:
show[vector]
showandxrel[vector]
correct[body]
dosave[op] (and friends)
No interaction with state or output:
dround maket opent translate rotate scale scale2 concat invert transform transformvec roundxy roundxyvec makepixelarray finddecompressor makegray findcolor findcoloroperator findcolormodeloperator makesampledcolor makesampledblack moveto lineto linetox linetoy curveto arcto conicto makeoutline findfont findfontvec modifyfont
Common implementations
----------------
Some device implementations may use these procedures in their class record, or call them in addition to some device-specific actions. Some of these procedures assume that context.state narrows to ImagerPrivate.State and some depend on other procedures in the class record. Note that device implementations are under no obligation to use any of these procedures; they may choose to use context.state for some other purpose, or leave it unused. Examples of devices that would take this latter approach are the InterPress-master creator and a lightweight-context display implementation.
InitState: PROC [context: Context];
Allocates and initalizes context.state.
ISet: PROC[context: Context, n: Name, x: REF];
ISetReal: PROC[context: Context, n: Name, x: REAL];
ISetInt: PROC[context: Context, n: Name, x: INT];
SetSampledColor: PROC[context: Context, pa: PixelArray, pixelT: Transformation, colorOperator: ATOM];
SetSampledBlack: PROC[context: Context, pa: PixelArray, pixelT: Transformation, transparent: BOOLEAN];
DoSave: PROC[context: Context, body: PROC];
DoSaveAll: PROC[context: Context, body: PROC];
ConcatT: PROC[context: Context, m: Transformation];
TranslateT: PROC[context: Context, x, y: REAL];
RotateT: PROC[context: Context, a: REAL];
ScaleT: PROC[context: Context, s: REAL];
Scale2T: PROC[context: Context, sx, sy: REAL];
Move: PROC[context: Context];
Trans: PROC[context: Context];
SetXY: PROC[context: Context, p: Pair];
IntegerSetXY: PROC[context: Context, x, y: INTEGER];
SetXYRel: PROC[context: Context, v: Pair];
IntegerSetXYRel: PROC[context: Context, x, y: INTEGER];
GetCP: PROC[context: Context] RETURNS[Pair];
GetCPRounded: PROC[context: Context] RETURNS[Pair];
MaskVector: PROC[context: Context, x1, y1, x2, y2: REAL];
IntegerMaskVector: PROC[context: Context, x1, y1, x2, y2: INTEGER];
StartUnderline: PROC[context: Context];
MaskUnderline: PROC[context: Context, dy, h: REAL];
IntegerMaskUnderline: PROC[context: Context, dy, h: INTEGER];
ClipOutline: PROC[context: Context, pathMap: PathMapType, pathData: REF];
ExcludeOutline: PROC[context: Context, pathMap: PathMapType, pathData: REF];
ClipRectangle: PROC[context: Context, x, y, w, h: REAL];
ExcludeRectangle: PROC[context: Context, x, y, w, h: REAL];
IntegerClipRectangle: PROC[context: Context, x, y, w, h: INTEGER];
IntegerExcludeRectangle: PROC[context: Context, x, y, w, h: INTEGER];
CorrectMask: PROC[context: Context];
CorrectSpace: PROC[context: Context, v: Pair];
CorrectSpaceView: PROC[context: Context, v: Pair];
v is in view coordinates for this one.
SetCorrectMeasure: PROC[context: Context, v: Pair];
SetCorrectTolerance: PROC[context: Context, v: Pair];
Space: PROC[context: Context, x: REAL];
IntegerSpace: PROC[context: Context, x: INTEGER];
Correct: PROC[context: Context, body: PROC];
Reset: PROC[context: Context];
GetSurfaceBounds: PROC[context: Context] RETURNS[IntRectangle];
END.