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]
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];