CDCreateLabels.mesa
Copyright (C) 1985 by Xerox Corporation. All rights reserved.
Created by: Christian Jacobi, March 1, 1985 4:52:57 pm PST
Last edited by: Christian Jacobi, December 29, 1986 6:24:38 pm PST
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 BOOLNIL] 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 BOOLNIL] 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 BOOLNIL] 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.