<> <> <> <> <<>> DIRECTORY GriffinKernel USING [Data], Imager USING [Font], ImagerColor USING [HSV], Rope USING [ROPE]; GriffinStyle: CEDAR DEFINITIONS = BEGIN <> <<>> Data: TYPE = GriffinKernel.Data; StyleHandle: TYPE = REF Style; Style: TYPE = RECORD [ color: Color _ [0, 0, 0], --major color dashed: DashPattern _ undashed, firstend, lastend: LineEnd _ [round, 0, 0, 0, 0, 0], junctiontype: JunctionType _ round, width: REAL _ 1, fillcolor: Color _ [0, 0, 0], filled: BOOLEAN _ FALSE, outlined: BOOLEAN _ TRUE, anchor: Anchor _ left, stringRotation: StringRotation _ or0, stringType: StringType _ normal, font: Font _ NIL, fillbackgnd: BOOLEAN _ FALSE, backgndcolor: Color _ [0, 0, 0], name: Rope.ROPE --stylename ]; Anchor: TYPE = {left, right, center}; Color: TYPE = ImagerColor.HSV; DashPattern: TYPE = {undashed, dash1, dash2, dash3, dash4, dash5}; EndType: TYPE = {round, cyclic, flat, angled}; Font: TYPE = Imager.Font; JunctionType: TYPE = {round, square, angled}; LineEnd: TYPE = RECORD [type: EndType, dx, dy, a, b, c: REAL]; StringRotation: TYPE = {or0, or90, or180, or270}; StringType: TYPE = {normal, stack}; lStyle: CARDINAL = SIZE [Style]; CopyCurrentStyle: PROC [data: Data] RETURNS [StyleHandle]; <> SetCurrentStyle: PROC [data: Data, style: StyleHandle]; <> <> Initialize: PROC [data: Data]; --initialize the current style <> <> <> <> <> <> NextName: PROC [data: Data] RETURNS [Rope.ROPE]; <> FontDescriptorHandle: TYPE = REF FontDescriptor; FontDescriptor: TYPE = RECORD [name: Rope.ROPE, rotation, face, points: CARDINAL]; InternalFont: TYPE = FontDescriptorHandle; FontSequence: TYPE = REF FontSequenceRec; FontSequenceRec: TYPE = RECORD[element: SEQUENCE length: NAT OF Font]; StyleSequence: TYPE = REF StyleSequenceRec; StyleSequenceRec: TYPE = RECORD[element: SEQUENCE length: NAT OF StyleHandle]; CreateStyleList: PROC [data: Data] RETURNS [StyleSequence]; CreateFontList: PROC [styles: StyleSequence] RETURNS [FontSequence]; NumberOfStyle: PROC [style: StyleHandle, styles: StyleSequence] RETURNS [CARDINAL]; NumberOfFont: PROC [font: Font, fonts: FontSequence] RETURNS [CARDINAL]; FindEquivalentStyle: PROC [style: StyleHandle, styles: StyleSequence] RETURNS [StyleHandle]; InternalFontFromFont: PROC [Font] RETURNS [InternalFont]; FontFromInternalFont: PROC [ifont: InternalFont] RETURNS [Font]; ComputeStringType: PROC [stringRotation: StringRotation, font: Font] RETURNS [StringType]; <> Rot0Degrees: CARDINAL = 0; Rot90Degrees: CARDINAL = 5400; Rot180Degrees: CARDINAL = 10800; Rot270Degrees: CARDINAL = 16200; Regular: CARDINAL = 0; Italic: CARDINAL = 1; Bold: CARDINAL = 2; BoldItalic: CARDINAL = Bold + Italic; END.