ImgImpl.mesa
Michael Plass, August 3, 1983 10:13 am
DIRECTORY Imager, ImagerBasic, Img, Rope, UnifiedFonts;
ImgImpl:
CEDAR
PROGRAM
IMPORTS Imager
EXPORTS Img
~ BEGIN
Rectangle: TYPE ~ Imager.Rectangle;
IntRectangle: TYPE ~ Imager.IntRectangle;
Pair: TYPE ~ Imager.Pair;
IntPair: TYPE ~ Imager.IntPair;
Context: TYPE ~ Imager.Context;
Transformation: TYPE ~ Imager.Transformation;
Clipper: TYPE ~ Imager.Clipper;
Visibility: TYPE ~ Imager.Visibility;
Path: TYPE ~ Imager.Path;
StrokeEnds: TYPE ~ Imager.StrokeEnds;
Color: TYPE ~ Imager.Color;
Create: PUBLIC PROC [deviceType: ATOM, name: Rope.ROPE] RETURNS [context: Context] ~ {context ← Imager.Create[deviceType, name]};
DeviceType:
PUBLIC
PROC [context: Context]
RETURNS [
ATOM]
~ {RETURN [Imager.DeviceType[context]]};
DoSaveAll:
PUBLIC
PROC [context: Context, action:
PUBLIC
PROC]
~ {Imager.DoSaveAll[context, action]};
DoSave:
PUBLIC
PROC [context: Context, action:
PUBLIC
PROC]
~ {Imager.DoSave[context, action]};
Flush:
PUBLIC
PROC [context: Context]
~ {Imager.Flush[context]};
Close:
PUBLIC
PROC [context: Context]
~ {Imager.Close[context]};
TranslateT:
PUBLIC
PROC [context: Context, dx, dy:
REAL]
~ {Imager.TranslateT[context, dx, dy]};
RotateT:
PUBLIC
PROC [context: Context, degrees:
REAL]
~ {Imager.RotateT[context, degrees]};
ScaleT:
PUBLIC
PROC [context: Context, sx, sy:
REAL]
~ {Imager.ScaleT[context, sx, sy]};
ConcatT:
PUBLIC
PROC [context: Context, transformation: Transformation]
~ {Imager.ConcatT[context, transformation]};
GetT:
PUBLIC
PROC [context: Context]
RETURNS [Transformation]
~ {RETURN [Imager.GetT[context]]};
SetT:
PUBLIC
PROC [context: Context, transformation: Transformation]
~ {Imager.SetT[context, transformation]};
IntTranslateT:
PUBLIC
PROC [context: Context, dx, dy:
INTEGER]
~ {Imager.IntTranslateT[context, dx, dy]};
IntScaleT:
PUBLIC
PROC [context: Context, sx, sy:
INTEGER]
~ {Imager.IntScaleT[context, sx, sy]};
GetClipper:
PUBLIC
PROC [context: Context]
RETURNS [Clipper]
~ {RETURN [Imager.GetClipper[context]]};
SetClipper:
PUBLIC
PROC [context: Context, clipper: Clipper]
~ {Imager.SetClipper[context, clipper]};
ClipPath:
PUBLIC
PROC [context: Context, outline: Path, exclude:
BOOLEAN ←
FALSE]
~ {Imager.ClipPath[context, outline, exclude]};
ClipRectangle:
PUBLIC
PROC [context: Context, outline: Rectangle, exclude:
BOOLEAN ←
FALSE]
~ {Imager.ClipRectangle[context, outline, exclude]};
TestRectangle:
PUBLIC
PROC [context: Context, area: Rectangle]
RETURNS [Visibility]
~ {RETURN [Imager.TestRectangle[context, area]]};
ClipIntRectangle:
PUBLIC
PROC [context: Context, outline: IntRectangle, exclude:
BOOLEAN ←
FALSE]
~ {Imager.ClipIntRectangle[context, outline, exclude]};
TestIntRectangle:
PUBLIC
PROC [context: Context, area: IntRectangle]
RETURNS [Visibility]
~ {RETURN [Imager.TestIntRectangle[context, area]]};
DoWithoutClipping:
PUBLIC
PROC [context: Context, bounds: IntRectangle, callBack:
PUBLIC
PROC[Context]]
~ {Imager.DoWithoutClipping[context, bounds, callBack]};
SetColor:
PUBLIC
PROC [context: Context, color: Color]
~ {Imager.SetColor[context, color]};
GetColor:
PUBLIC
PROC [context: Context]
RETURNS [Color]
~ {RETURN [Imager.GetColor[context]]};
MaskStroke:
PUBLIC
PROC [context: Context, path: Path, width:
REAL, strokeEnds: StrokeEnds, closed:
BOOLEAN ←
FALSE]
~ {Imager.MaskStroke[context, path, width, strokeEnds]};
MaskFill:
PUBLIC
PROC [context: Context, path: Path]
~ {Imager.MaskFill[context, path]};
MaskPixel:
PUBLIC
PROC [context: Context, pixelArray: ImagerBasic.PixelArray]
~ {Imager.MaskPixel[context, pixelArray]};
MaskBits:
PUBLIC
PROC [context: Context, base:
LONG
POINTER, raster:
CARDINAL, tile: IntRectangle, area: IntRectangle]
~ {Imager.MaskBits[context, base, raster, tile, area]};
MaskSegment:
PUBLIC
PROC [context: Context, p: Pair]
~ {Imager.MaskSegment[context, p]};
MaskIntSegment:
PUBLIC
PROC [context: Context, p: IntPair]
~ {Imager.MaskIntSegment[context, p]};
MaskThinStroke:
PUBLIC
PROC [context: Context, path: Path]
~ {Imager.MaskThinStroke[context, path]};
MaskRectangle:
PUBLIC
PROC [context: Context, area: Rectangle]
~ {Imager.MaskRectangle[context, area]};
MaskIntRectangle:
PUBLIC
PROC [context: Context, area: IntRectangle]
~ {Imager.MaskIntRectangle[context, area]};
SetCP:
PUBLIC
PROC [context: Context, cp: Pair]
~ {Imager.SetCP[context, cp]};
GetCP:
PUBLIC
PROC [context: Context]
RETURNS [Pair]
~ {RETURN [Imager.GetCP[context]]};
SetIntCP:
PUBLIC
PROC [context: Context, cp: IntPair]
~ {Imager.SetIntCP[context, cp]};
GetIntCP:
PUBLIC
PROC [context: Context]
RETURNS [IntPair]
~ {RETURN [Imager.GetIntCP[context]]};
MaskChar:
PUBLIC
PROC [context: Context, font: UnifiedFonts.
FONT, char:
CHAR]
~ {Imager.MaskChar[context, font, char]};
MaskCharacters:
PUBLIC
PROC [context: Context, font: UnifiedFonts.
FONT, characters:
REF, start:
INT ← 0, length:
INT ←
LAST[
INT]]
~ {Imager.MaskCharacters[context, font, characters, start, length]};
CreateBuffer: PUBLIC PROC [deviceType: ATOM, box: IntRectangle] RETURNS [context: Context] ~ {context ← Imager.CreateBuffer[deviceType, box]};
TransferBuffer:
PUBLIC
PROC [context, source: Context]
~ {Imager.TransferBuffer[context, source]};
SpecialOp:
PUBLIC
PROC [context: Context, op:
ATOM, data:
REF]
RETURNS [
BOOLEAN]
~ {RETURN [Imager.SpecialOp[context, op, data]]};
END.