% graphics.jam
% last changed by Doug Wyatt, 17-Dec-81 17:29:39
% last changed by Bill Paxton, March 12, 1982 10:03 am

(graphics) 256 .dict .def

graphics .begin

(twopop){.pop .pop}.cvx .def

(TwoPop) { (twopop) .load .def } .cvx .def

(.reddown) TwoPop
(RedDown) { .reddown } .cvx .def
(CtrlRedDown) TwoPop
(ShiftRedDown) TwoPop
(CtrlShiftRedDown) TwoPop

(.redup) TwoPop
(RedUp) { .redup } .cvx .def
(CtrlRedUp) TwoPop
(ShiftRedUp) TwoPop
(CtrlShiftRedUp) TwoPop

(.yellowdown) TwoPop
(YellowDown) { .yellowdown } .cvx .def
(CtrlYellowDown) TwoPop
(ShiftYellowDown) TwoPop
(CtrlShiftYellowDown) TwoPop

(.yellowup) TwoPop
(YellowUp) { .yellowup } .cvx .def
(CtrlYellowUp) TwoPop
(ShiftYellowUp) TwoPop
(CtrlShiftYellowUp) TwoPop

(.bluedown) TwoPop
(BlueDown) { .bluedown } .cvx .def
(CtrlBlueDown) TwoPop
(ShiftBlueDown) TwoPop
(CtrlShiftBlueDown) TwoPop

(.blueup) TwoPop
(BlueUp) { .blueup } .cvx .def
(CtrlBlueUp) TwoPop
(ShiftBlueUp) TwoPop
(CtrlShiftBlueUp) TwoPop

(.track) TwoPop
(Track) { .track } .cvx .def
(CtrlTrack) TwoPop
(ShiftTrack) TwoPop
(CtrlShiftTrack) TwoPop

(.interrupt){.stop}.cvx .def

(fat){.true .setfat}.cvx .def
(thin){.false .setfat}.cvx .def

(gray0){ -1 .setcolor}.cvx .def
(gray1){ 32767 .setcolor}.cvx .def
(gray2){ 32735 .setcolor}.cvx .def
(gray3){ 24543 .setcolor}.cvx .def
(gray4){ 24415 .setcolor}.cvx .def
(gray5){ 23391 .setcolor}.cvx .def
(gray6){ 23390 .setcolor}.cvx .def
(gray7){ 23134 .setcolor}.cvx .def
(gray8){ 23130 .setcolor}.cvx .def
(gray9){ 6746 .setcolor}.cvx .def
(gray10){ 6730 .setcolor}.cvx .def
(gray11){ 2634 .setcolor}.cvx .def
(gray12){ 2570 .setcolor}.cvx .def
(gray13){ 2058 .setcolor}.cvx .def
(gray14){ 2050 .setcolor}.cvx .def
(gray15){ 2 .setcolor}.cvx .def
(gray16){ 0 .setcolor}.cvx .def
(black){gray0}0 .aget .def
(white){gray16}0 .aget .def
(checked){ 13260 .setcolor}.cvx .def
(gray){21210B .setcolor}.cvx .def

(wh){white}0 .aget .def
(gr){gray8}0 .aget .def
(bl){black}0 .aget .def

(m){.touch .moveto}.cvx .def
(t){.touch .translate}.cvx .def
(e){.erase}.cvx .def

(box){.touch .touch .drawbox}.cvx .def
(cbox){.touch .touch .clipbox .erase}.cvx .def
(cxbox){.touch .touch .clipxbox .erase}.cvx .def

(traj){.touch .moveto 1 .sub {.touch .lineto}.cvx .rept}.cvx .def
(poly){traj .close}.cvx .def

(area){poly .drawarea}.cvx .def
(carea){poly .cliparea .erase}.cvx .def
(cxarea){poly .clipxarea .erase}.cvx .def
(open){poly .drawpath}.cvx .def
(path){traj .drawpath}.cvx .def

(dot){2 .copy .moveto 2 .copy .drawto}.cvx .def

(spline){{.touch dot .knot}.cvx .rept .spline}.cvx .def
(cspline){{.touch dot .knot}.cvx .rept .cspline}.cvx .def

(curve){spline .drawpath}.cvx .def
(ccurve){cspline .close .drawpath}.cvx .def

(blob){cspline .drawarea}.cvx .def
(cblob){cspline .cliparea .erase}.cvx .def

(spray){.touch .translate .pushdc
 120 {0 0 .moveto 1000 0 .drawto 3 .rotate}.cvx .rept
 .popdc}.cvx .def

(fox)(The quick brown fox jumps over the lazy dog.).def
(hi){m (Hello).drawtext}.cvx .def
(his){{.mouse .moveto (Hello).drawtext}.cvx .loop}.cvx .def
(foxes){{.mouse .moveto fox .drawtext}.cvx .loop}.cvx .def
(boxes){{.mouse .translate -25 -25 25 25 .drawbox}.cvx .loop}.cvx .def

(draw){.touch .moveto {.mouse .drawto}.cvx .loop}.cvx .def

(scribble) { (.track) { .drawto } .cvx .def (.reddown) { .moveto } .cvx .def } .cvx .def
(unscribble) { (.track) { .pop .pop } .cvx .def (.reddown) { .pop .pop } .cvx .def } .cvx .def