DIRECTORY CD, CDBasics, CStitching, D2Basic, Rope; CDCSUtil: CEDAR DEFINITIONS = BEGIN Tesselation: TYPE = CStitching.Tesselation; Scale: TYPE = RECORD [ off: CD.Position _ [0, 0], num: INT _ 1, denom: INT _ 1 ]; -- scaling: scaledNumber _ (cdNumber+off)*num/denom CDWorld: TYPE = REF CDWorldRec; CDWorldRec: TYPE = RECORD [ design: CD.Design_NIL, ob: CD.Object _ NIL, restrict: CD.Rect _ CDBasics.universe, minGrowClip: CD.Number _ 0, scale: Scale, drawChild: CD.DrawProc _ NIL, drawContext: CD.DrawContextProc _ NIL, stopFlag: REF BOOL _ NIL, propRef: CD.PropRef, --for client only data: REF _ NIL --for client only ]; Layers: TYPE = LIST OF LayerDesc; LayerDesc: TYPE = REF LayerDescRec _ NIL; LayerDescRec: TYPE = RECORD [ source: CD.Layer, deltaDiameter: INT _ 0, -- + means cs feature is bigger than cd feature, in scaled numbers growClip: CD.Number _ 0, plane: Tesselation_NIL --NIL: use output tesselation; #NIL use this tesselation ]; New: PROC [filledWith: REF_NIL, data: REF _ NIL, stopFlag: REF BOOL _ NIL] RETURNS [plane: Tesselation]; Dispose: PROC [basis: Tesselation]; Make: PROC [what: CDWorld, layers: Layers, into: Tesselation_NIL] RETURNS [Tesselation]; ExtractErrors: PROC [what: CDWorld, x: Tesselation, msg: Rope.ROPE, owner: ATOM_NIL, dispose: BOOL_TRUE, remFirst: BOOL_TRUE, except: REF_NIL] RETURNS [num: INT_0]; BackRect: PROC [what: CDWorld, csRect: CStitching.Rect] RETURNS [CD.Rect]; Fill: PROC [x: Tesselation, into: Tesselation_NIL, except: REF_NIL, dispose: BOOL_FALSE] RETURNS [Tesselation]; Rem: PROC [x: Tesselation, into: Tesselation_NIL, except: REF_NIL, dispose: BOOL_FALSE] RETURNS [Tesselation]; FillGrow: PROC [x: Tesselation, grow: INT_0, into: Tesselation_NIL, except: REF_NIL, use: REF_$covered, dispose: BOOL_FALSE] RETURNS [Tesselation]; Copy: PROC [x: Tesselation, into: Tesselation_NIL, dispose: BOOL_FALSE] RETURNS [Tesselation]; Not: PROC [x: Tesselation, dispose: BOOL_FALSE] RETURNS [Tesselation]; AndIn: PROC [x: Tesselation, into: Tesselation, dispose: BOOL_FALSE] RETURNS [Tesselation]; OrIn: PROC [x: Tesselation, into: Tesselation, dispose: BOOL_FALSE] RETURNS [Tesselation]; AndNotIn: PROC [x, into: Tesselation, dispose: BOOL_FALSE] RETURNS [Tesselation]; And: PROC [t1, t2, t3, t4: Tesselation_NIL] RETURNS [Tesselation]; Or: PROC [t1, t2, t3, t4: Tesselation_NIL] RETURNS [Tesselation]; AndNot: PROC [a, n: Tesselation] RETURNS [Tesselation]; Grow: PROC [x: Tesselation, amount: INT_0, dispose: BOOL_FALSE] RETURNS [Tesselation]; END. zCDCSUtil.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Created by: Christian Jacobi, December 12, 1985 2:19:57 pm PST Last edited by: Christian Jacobi, December 1, 1986 7:02:20 pm PST --creates new tesselation --free memory of tesselation --converts from cd world to tesselation world --writes the contexnts of tesselation as error messages back into cd world --un-scales a rectangle from tesselation world into cd world, --in doubt larger, usefull for error messages --basic operations --fills "into" with $covered except where "x" has "except" --NIL "into" creates new tesselation filled with NIL --fills "into" with NIL except where "x" has "except" --NIL "into" creates new tesselation filled with $covered --fills "into" with "use" except where "x" has "except" --NIL "into" creates new tesselation filled with NIL --simple copy operation --fills "into" with "x" except where "x" is NIL --NIL "into" creates new tesselation filled with NIL --simple operators; use only $covered and NIL --into _ into AND (~x) --a AND (~n) --grows if amount>0 --shrinks if amount<0; (Not per tile! grows background) ΚΉ˜codešœ ™ Kšœ Οmœ1™™>K™A—šΟk ˜ Kšžœ˜Kšœ ˜ Kšœ ˜ Kšœ˜Kšœ˜—K˜KšΟnœžœž œ˜Kšžœ˜K˜Kšœ žœ˜,šœžœžœ˜Kšœžœ˜Kšœžœ˜ Kšœžœ˜K˜KšΟc*œ œ˜3—K˜Kšœ žœžœ ˜šœ žœžœ˜Kšœžœžœ˜Kšœžœ žœ˜Kšœ žœ˜&Kšœ žœ˜Kšœ ˜ Kšœ žœ žœ˜Kšœ žœžœ˜&Kšœ žœžœžœ˜Kšœ žœ  ˜&Kšœžœž ˜!Kšœ˜—K˜Jšœžœžœžœ ˜!Jšœ žœžœžœ˜)šœžœžœ˜Jšœžœ˜Jšœžœ B˜ZJšœ žœ ˜Jšœžœ 8˜OJ˜—K˜šŸœžœžœžœžœžœ žœžœžœžœ˜hK™—K˜šŸœžœ˜#K™—K˜šŸœžœ3žœžœ˜XK™-—K˜šŸ œžœ+žœ žœžœ žœžœ žœžœ žœžœžœžœ˜€K™J—K˜šŸœžœ*žœžœ˜JKš >™>Kš -™-K˜—K˜K™K˜šŸœžœ$žœ žœžœ žœžœžœ˜oKšœ;™;Kšœ5™5—K™šŸœžœ$žœ žœžœ žœžœžœ˜nKšœ6™6Kšœ:™:K™—šŸœžœžœžœ žœžœžœžœžœžœ˜“Kšœ8™8Kšœ5™5—K™š Ÿœžœ$žœ žœžœžœ˜^Kšœ™Kšœ0™0Kšœ5™5K˜—K˜K™.K˜Kš Ÿœžœžœžœžœ˜FK˜Kš Ÿœžœ.žœžœžœ˜[K˜Kš Ÿœžœ.žœžœžœ˜ZK˜š Ÿœžœ!žœžœžœ˜QKšœ™—K˜KšŸœžœžœžœ˜BK˜KšŸœžœžœžœ˜AK˜šŸœžœžœ˜7Kšœ ™ —K˜š Ÿœžœžœ žœžœžœ˜VKšœ™Kšœ8™8—K˜Kšžœ˜K˜—…— δ