DIRECTORY ImagerBasic USING [InteractiveImagingDevice, Path, SourceType, PxlValue, Font, IntVec, Vec]; ImagerInternalDefs: CEDAR DEFINITIONS = BEGIN Context ImagingSpace: TYPE = { client, viewer, device }; DisplayContext: TYPE = REF DisplayContextRep; -- Holds the imager state DisplayContextRep: TYPE = RECORD [ interactive: BOOLEAN, device: ImagerBasic.InteractiveImagingDevice, deviceProcs: REF ANY, -- Procedures supplied by device currentSource: SourceRecord, currentFont: ImagerBasic.Font, currentIntPosition: ImagerBasic.IntVec, -- CP kept in device space currentPosition: ImagerBasic.Vec, -- For floating point types -- ********* Transformations ************ clientTransform: TransformRecord _ DefaultTransformRecord, viewerTransform: TransformRecord _ DefaultTransformRecord, deviceTransform: TransformRecord _ DefaultTransformRecord, transform: TransformRecord, -- composite transformation -- ***************** Clipping *********** clientClipper: ClipperRecord _ DefaultClipperRecord, viewerClipper: ClipperRecord _ DefaultClipperRecord, deviceClipper: ClipperRecord _ DefaultClipperRecord, clipper: ClipperRecord, -- composite clipper noClipArmed, noClip: BOOLEAN, data: REF -- Interpretation of this depends on the procs ]; TransformType: TYPE = { none, identity, rot90, rot180, rot270, mirrorX, mirrorY, mirror45Deg, mirror135Deg, hard }; TransformRecord: TYPE = RECORD [ x, y: INTEGER, type: TransformType, transformation: Transformation -- used if type is "hard" ]; DefaultTransformRecord: TransformRecord = [0, 0, identity, NIL]; Transformation: TYPE = REF TransformRep; TransformRep: TYPE = RECORD [ a, b, c, d, e, f: REAL ]; ClipperType: TYPE = {none, rectangle, path}; ClipperRecord: TYPE = RECORD [ xMin, xMax, yMin, yMax: INTEGER, -- what if Client clipper is outside integer range? type: ClipperType, clipper: Clipper -- used if type is "path" ]; DefaultClipperRecord: ClipperRecord = [0, 1024, 0, 1024, rectangle, NIL]; -- not good? Clipper: TYPE = REF ClipperRep; ClipperRep: TYPE = RECORD [ xMin, xMax, yMin, yMax: REAL, paths: LIST OF RECORD [exclude: BOOLEAN, path: ImagerBasic.Path] ]; RGBValue: TYPE = RECORD [ red, green, blue: REAL]; AISFile: TYPE[1]; -- to be filled in SourceRecord: TYPE = RECORD [ type: ImagerBasic.SourceType, -- {black, white, constant, pixelarray, sampled, functional} color: RGBValue, pxlValue: ImagerBasic.PxlValue, -- TYPE = LONG CARDINAL samples: REF ANY _ NIL -- gets NARROWed by called procedure ]; SampleSequence: TYPE = REF SampleSequenceRep; SampleSequenceRep: TYPE = RECORD [ length: NAT, seq: SEQUENCE maxLength: NAT OF LONG CARDINAL ]; SampledSource: TYPE = REF SampledSourceRep; SampledSourceRep: TYPE = RECORD [ transformation: Transformation, colorModel: ColorModel, maximumSampleValue: LONG CARDINAL, sampledSourceProc: PROC [sampledSource: SampledSource, sampleSequence: SampleSequence, numberOfSamples: NAT, x0, y0, deltaX, deltaY: INTEGER -- Description of the sample line, in the SampledImage's coordinate system. The delta values tell how to get to the next point. ] _ NIL, data: REF ANY ]; ColorModel: TYPE = ATOM; PixelBox: TYPE = REF PixelBoxRep; PixelBoxRep: TYPE = RECORD [ bitsPerPixel: CARDINAL, numberOfRows: CARDINAL, wordsPerRow: CARDINAL, -- rows are word-size multiples for efficiency array: LONG POINTER -- pointer to block of memory representing pixels ]; Paths Masks END. ŒImagerInternalDefs.mesa This interface provides the underlying data structures necessary to more than one definitions module within the Imager Last Edited by: Crow, June 18, 1983 12:08 pm Basic Definitions (Numbers and Shapes) Devices Transformations Representation of the transformation matrix (as in Interpress) a d 0 b e 0 c f 1 (or tx ty 1) Clipping Sources Sampled Sources - Interpress model From the SampledImage's coordinate system to the standard coordinate system. The samples should be appended onto the end of this sequence. PixelBoxes Pixel boxes hold BitBlt-able chunks of memory represented as pixels. Fonts Characters Κ‘˜headšœ™J™vJ™šœ™Jšœ™—unitšΟk ˜ Lšœ œE˜VJšœ ˜ ——šœ%˜%Jšœ˜J˜—Ihead3šΟb&™&šž˜Jšœœ˜2LšœœœΟc˜Gšœœœ˜"Jšœ œ˜Jšœ-˜-Jšœ œœŸ ˜9J˜Jšœ˜Jšœ(Ÿ˜EJšœ&Ÿ˜ALšŸ,˜,Jšœœ)˜:Jšœœ)˜:Jšœœ)˜:Jšœ œŸ$˜A—šŸ5˜5Jšœ4˜4Jšœ4˜4Jšœ4˜4JšœŸœŸ"˜9Jšœœ˜LšœŸ1˜:J˜J˜——Mšž™šž™Jšœœa˜tšœœœ˜ Jšœœ˜Jšœ˜Jšœ Ÿ˜9Jšœ˜—Lšœ;œ˜@Lšœœœ˜(šœœœ˜Jšœ˜J˜—šΟi>™>J™Jšœ™J™J™J™—šž™Lšœ œ˜,šœœœ˜JšœœŸ3˜TJšœ˜JšœŸ˜0J˜—LšœDœŸ ˜WLšœ œœ ˜šœ œœ˜Jšœœ˜Jš œœœœ œ˜@J˜J˜———šž™Jšœ œœœ˜2Jšœ œŸ˜/šœœœ˜JšœŸ=˜[Jšœ˜Jšœ"Ÿ˜;Jšœ œœœŸ$˜=J˜—š "™"Lšœœœ˜-šœœœ˜"Jšœœ˜ Jš œœ œœœ˜-Jšœ˜—Lšœœœ˜+šœœœ˜!˜JšœL™L—Jšœ˜Jšœœœ˜"šœœ˜6šœ˜J™=—Jšœœ˜JšœœŸ˜ŸJšœœ˜—Jšœœ˜ —Jšœ˜Jšœ œœ˜—J˜š  ™ JšœF™FLšœ œœ ˜!šœ œœ˜Jšœœ˜Jšœœ˜Jšœ œŸ.˜FJšœ œŸ2˜GJšœ˜J˜———Mšž˜Mšž˜Mšž™Mšž ™ Jšœ˜M˜—…— „‘