<> <> <> <> DIRECTORY CD USING [Design, Layer, Object], CStitching USING [Tesselation, Pos], Imager USING [Font], ImagerSample USING [SampleMap], Rope USING [ROPE]; CDCreateLabels: CEDAR DEFINITIONS = BEGIN MakeCharCell: PROC [design: CD.Design, font: Imager.Font, char: CHAR, scale: INT _ -1, layer: CD.Layer, stop: REF BOOL_NIL] RETURNS [cell: CD.Object]; <<--Creates cell for a character; character cells in a design are cached and reused !>> <<--design=NIL is ok, but then cell will not be cached>> <<--font can be scaled, scale is applied after scan conversion of characters>> MakeRopeCell: PROC [design: CD.Design, text: Rope.ROPE, font: Imager.Font, scale: INT _ -1, layer: CD.Layer, stop: REF BOOL_NIL] RETURNS [cell: CD.Object]; <<--Creates cell for a text>> <<--design=NIL is ok, but then characters will not be cached>> <<--font can be scaled, scale is applied after scan conversion of characters>> <<>> <<--internal procedures which could be usefull outside>> CStitchSampleMap: PROC [map: ImagerSample.SampleMap, stop: REF BOOL_NIL] RETURNS [CStitching.Tesselation]; <<--Creates a Corner stitched tesselation from a SampleMap>> <<--Non 0 samples fill the plane with $covered tiles>> <<--stop: put on tesselation AND can stop conversion>> CreateCellFromCStitching: PROC [plane: CStitching.Tesselation, layer: CD.Layer, csOrigin: CStitching.Pos _ [0, 0], scale: INT _ 1] RETURNS [cell: CD.Object]; <<--Create cell from Corner stitched tesselation; cell not included into any design>> <<--plane: all tiles with non NIL values introduce rectangles of layer "layer" >> <<--csOrigin: place of origin, in c-stitching plane >> <<--scale: cd number _ scale * c-stitching number >> <<--May fail; then cell=NIL>> <<--Listens to plane's stop flag; [stop is no failure; cell maybe # NIL]>> <<>> END.