CONST Width = 40; PROC DrawSquare(a) IS IF VAR w = Width / 2 + 2, b = R2.Plus(a, (w, w)) IN PS.Save(); Rect.DrawC(a, b); PS.SetWidth(1); PS.SetJointStyle(PS.MiterJoints); PS.Stroke(); PS.Restore() END FI END; UI PointTool(DrawSquare); PROC Dot1(a) IS IF PS.MoveTo(a); PS.LineTo(a); PS.Stroke(); DrawSquare(a) FI END; PROC Dot2(a) IS IF PS.MoveTo(a); PS.Close(); PS.Stroke(); DrawSquare(a) FI END; UI PointTool(Dot1); UI PointTool(Dot2); PROC ButtEnds() IS PS.SetEndStyle(PS.ButtEnds) END; PROC SquareEnds() IS PS.SetEndStyle(PS.SquareEnds) END; PROC RoundEnds() IS PS.SetEndStyle(PS.RoundEnds) END; UI PointTool(ButtEnds); UI PointTool(SquareEnds); UI PointTool(RoundEnds); PROC MiterJoints() IS PS.SetJointStyle(PS.MiterJoints) END; PROC BevelJoints() IS PS.SetJointStyle(PS.BevelJoints) END; PROC RoundJoints() IS PS.SetJointStyle(PS.RoundJoints) END; UI PointTool(MiterJoints); UI PointTool(BevelJoints); UI PointTool(RoundJoints); UI PointTool(Cmd0); PROC Cmd0() IS IF VAR a ~ (54, 499), b = (54, 475), c = (0, 10) REL (a, b), d = (0, 14) REL (a, b), e = (0, 18) REL (a, b), f = (-2, 14) REL (a, b), g = (3, 8) REL (a, b), h = (10, 8) REL (a, b), i = (17, 8) REL (a, b), j = (10, 3) REL (a, b), k = (2, 10) REL (a, b), l = (4, 10) REL (a, b), m = (9, 10) REL (a, b), n = (11, 10) REL (a, b), o = (16, 10) REL (a, b), p = (18, 10) REL (a, b), q = (2, 18) REL (a, b), r = (4, 18) REL (a, b), s = (9, 18) REL (a, b), t = (11, 18) REL (a, b), u = (16, 18) REL (a, b), v = (18, 18) REL (a, b), w = (2, 14) REL (a, b), x = (4, 14) REL (a, b), y = (9, 14) REL (a, b), z = (11, 14) REL (a, b), a0 = (16, 14) REL (a, b), b0 = (18, 14) REL (a, b), c0 = (-6, 3) REL (a, b), d0 = (-1, 3) REL (a, b), e0 = (-8, 6) REL (a, b), f0 = (-3, 6) REL (a, b) IN a VER b -> PS.SetFontSize(PS.Large); PS.SetWidth(Width); Type.C(c, "Butt"); Type.C(d, "Square"); Type.C(e, "Round"); Type.C(f, "End Styles"); TypeLinesR.East(g, "Miter"); TypeLinesR.East(h, "Bevel"); TypeLinesR.East(i, "Round"); TypeLinesC.Center(j, "Joint\nStyles"); ButtEnds(); MiterJoints(); Dot1(k); Dot2(l); BevelJoints(); Dot1(m); Dot2(n); RoundJoints(); Dot1(o); Dot2(p); RoundEnds(); MiterJoints(); Dot1(q); Dot2(r); BevelJoints(); Dot1(s); Dot2(t); RoundJoints(); Dot1(u); Dot2(v); SquareEnds(); MiterJoints(); Dot1(w); Dot2(x); BevelJoints(); Dot1(y); Dot2(z); RoundJoints(); Dot1(a0); Dot2(b0); PS.SetFont("Courier", PS.Small); TypeLinesL.Center(c0, "PS.MoveTo(a);\nPS.LineTo(a);\nPS.Stroke()"); TypeLinesL.Center(d0, "PS.MoveTo(a);\nPS.Close();\nPS.Stroke()"); Rect.DrawC(c0, e0); Rect.DrawC(d0, f0); PS.SetWidth(1); MiterJoints(); PS.Stroke() END FI END;