<> <> <> <> DIRECTORY CDProperties, CD, Rope, CDValue; CDSetupPD: CEDAR PROGRAM IMPORTS CDProperties, CD, CDValue = BEGIN Stipple4: TYPE = ARRAY [0..4) OF [0..16); Stipple8: TYPE = ARRAY [0..8) OF [0..256); currentTech: CD.Technology_NIL; cLev: CD.Layer _ CD.combined; blackX: REF _ $CDxVersatecBlack; cyanX: REF _ $CDxVersatecCyan; yellowX: REF _ $CDxVersatecYellow; magentaX: REF _ $CDxVersatecMagenta; Technology: PROC[tech: ATOM] = BEGIN IF currentTech#NIL THEN ERROR; currentTech _ CD.FetchTechnology[tech]; END; Keys: PROC[device, b, c, m, y: ATOM, text: Rope.ROPE_NIL] = BEGIN blackX _ b; cyanX _ c; yellowX _ y; magentaX _ m; CDValue.Store[currentTech, device, text]; CDProperties.PutPropOnAtom[device, $CDxColorPDPlotBlack, blackX]; CDProperties.PutPropOnAtom[device, $CDxColorPDPlotCyan, cyanX]; CDProperties.PutPropOnAtom[device, $CDxColorPDPlotYellow, yellowX]; CDProperties.PutPropOnAtom[device, $CDxColorPDPlotMagenta, magentaX]; CDProperties.PutPropOnAtom[device, $CDxLastTechnology, currentTech.key]; FOR l: CD.Layer IN CD.Layer DO Forgett[l] ENDLOOP; END; End: PROC [] = BEGIN currentTech _ NIL END; LayerModify: PROC[uniqueKey: ATOM] = BEGIN cLev _ CD.FetchLayer[t: currentTech, uniqueKey: uniqueKey]; END; Layer: PROC[uniqueKey: ATOM] = BEGIN cLev _ CD.FetchLayer[t: currentTech, uniqueKey: uniqueKey]; Forgett[cLev] END; LayerNumber: PROC [lev: NAT] = BEGIN cLev _ lev; Forgett[cLev] END; LayerNumberModify: PROC [lev: NAT] = BEGIN cLev _ lev END; Black8: PROC [stipple: Stipple8] = BEGIN IF blackX#NIL THEN CDProperties.PutPropOnLayer[onto: cLev, prop: blackX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple8 _ stipple] ] END; Black4: PROC [stipple: Stipple4] = BEGIN IF blackX#NIL THEN CDProperties.PutPropOnLayer[onto: cLev, prop: blackX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple4 _ stipple] ] END; Cyan8: PROC [stipple: Stipple8] = BEGIN CDProperties.PutPropOnLayer[onto: cLev, prop: cyanX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple8 _ stipple] ] END; Cyan4: PROC [stipple: Stipple4] = BEGIN CDProperties.PutPropOnLayer[onto: cLev, prop: cyanX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple4 _ stipple] ] END; Magenta8: PROC [stipple: Stipple8] = BEGIN CDProperties.PutPropOnLayer[onto: cLev, prop: magentaX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple8 _ stipple] ] END; Magenta4: PROC [stipple: Stipple4] = BEGIN CDProperties.PutPropOnLayer[onto: cLev, prop: magentaX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple4 _ stipple] ] END; Yellow8: PROC [stipple: Stipple8] = BEGIN CDProperties.PutPropOnLayer[onto: cLev, prop: yellowX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple8 _ stipple] ] END; Yellow4: PROC [stipple: Stipple4] = BEGIN CDProperties.PutPropOnLayer[onto: cLev, prop: yellowX, val: IF stipple=ALL[0] THEN NIL ELSE NEW[Stipple4 _ stipple] ] END; Forgett: PROC [lev: NAT] = BEGIN IF blackX#NIL THEN CDProperties.PutPropOnLayer[onto: lev, prop: blackX, val: NIL]; IF cyanX#NIL THEN CDProperties.PutPropOnLayer[onto: lev, prop: cyanX, val: NIL]; IF magentaX#NIL THEN CDProperties.PutPropOnLayer[onto: lev, prop: magentaX, val: NIL]; IF yellowX#NIL THEN CDProperties.PutPropOnLayer[onto: lev, prop: yellowX, val: NIL]; END; END.