DIRECTORY
Graphics
USING [SetCP, DrawRope, Scale, Save, Restore, Mark],
GraphicsBasic
USING [MapperRef],
GraphicsOps
USING [GetMapper, SetMapper],
ViewerClasses
USING [Viewer, PaintProc, ViewerClassRec],
ViewerOps
USING [CreateViewer, RegisterViewerClass],
Rope
USING [
ROPE];
COGTest:
CEDAR
PROGRAM
IMPORTS GraphicsOps, Graphics, ViewerOps =
BEGIN
OPEN GrB: GraphicsBasic, GrOp: GraphicsOps, Graphics, ViewerClasses, ViewerOps;
MyPainter: PaintProc =
BEGIN
mk: Mark;
mp: GrB.MapperRef ← GrOp.GetMapper[context];
SetCP[context, 50,50];
DrawRope[context, "Bananas"];
Scale[context, 2.33, 2.33];
DrawRope[context, "Pitombas"];
mk ← Save[context];
SetCP[context, 40,40];
DrawRope[context, "XXX"];
GrOp.SetMapper[context, mp];
DrawRope[context, "YYY"];
Restore[context, mk];
DrawRope[context, "ZZZ"];
END;