DIRECTORY Scaled USING [Value]; ImagerBasic: CEDAR DEFINITIONS = BEGIN Pair: TYPE = RECORD [x, y: REAL]; IntPair: TYPE = RECORD [x, y: INTEGER]; Edge: TYPE = RECORD [a, b: Pair]; IntEdge: TYPE = RECORD [a, b: IntPair]; Rectangle: TYPE = RECORD [x, y, w, h: REAL]; IntRectangle: TYPE = RECORD [x, y, w, h: INTEGER]; Bezier: TYPE = RECORD [b0, b1, b2, b3: Pair]; -- Bezier control points for a cubic curve TransformType: TYPE = { none, identity, rot90, rot180, rot270, mirrorX, mirrorY, mirror45Deg, mirror135Deg, hard }; Transformation: TYPE = RECORD [ -- a transformation matrix a, b, c, d, e, f: REAL, -- matrix elements type: TransformType -- identifies special matrix forms ]; Visibility: TYPE = {visible, partlyVisible, invisible}; Path: TYPE = REF PathRep; PathRep: TYPE = RECORD [ generateProc: PROC [ path: Path, move: PROC [Pair], line: PROC [Pair], curve: PROC [Pair, Pair, Pair] ], data: REF ANY ]; StrokeEnds: TYPE = {butt, square, round}; Color: TYPE = REF; CIEColor: TYPE = REF CIEColorRep; CIEColorRep: TYPE = RECORD [x, y, Y: CARDINAL]; SampledColor: TYPE = REF SampledColorRep; SampledColorRep: TYPE = RECORD [ transparent: BOOLEAN, -- are 0 samples white (false) or transparent (true)? pa: PixelArray, -- the array of samples m: Transformation, -- transforms from pa to device coordinates colorMap: ATOM -- maps samples into colors ]; PixelArray: TYPE = REF PixelArrayRep; PixelArrayRep: TYPE = RECORD [ xPixels, yPixels: INT, -- dimensions of the array, in pixels, in standard coordinates ((0, 0) at lower left, y increasing upwards, x increasing to the right). maxSampleValue: INT, -- the range of sample values is [0..maxSampleValue] samplesPerPixel: INT, -- number of samples for each pixel get: PROC [ self: PixelArray, buffer: PixelBuffer, nSamples: NAT, layer: INT, xStart, yStart: Scaled.Value, xDelta, yDelta: Scaled.Value ], data: REF ANY ]; PixelBuffer: TYPE = REF PixelBufferRep; PixelBufferRep: TYPE = RECORD [ SEQUENCE maxLength: NAT OF CARDINAL ]; END. „ImagerBasic.mesa This interface provides the public data structures shared by clients and the Imager. Last Edited by: Crow, Plass, Wyatt, July 6, 1983 2:38 pm Basic Definitions (Numbers and Shapes) Transformations The form of the complete transformation matrix is: a d 0 b e 0 c f 1 Clipping Paths A client of the Imager may keep a path representation in a form appropriate for its own use; it only needs to unravel it into a series of MoveTo, LineTo and CurveTo operations when it is asked. Masks Colors CIE Chromaticity coordinates PixelArrays object implementation fills this with the requested number of samples. number of samples to put in buffer. in the range [0..samplesPerPixel) position of first sample. increment to get to successive samples. for use by the get proc; some devices may discriminate on this REF to get at the representation directly, if they are able to recognize it. Κ–˜headšœ™J™TJ™šœ™Jšœ(™(—IunitšΟk œœ ˜—head2šœ œ ˜Jšœ˜—head3šΟb&™&Jšœœœœ˜!Jšœ œœœ˜'Jšœœœ˜!Jšœ œœ˜'Jšœ œœ œ˜,Jšœœœ œ˜2JšœœœΟc*˜X—šž™Jšœœ`˜sJ˜šœœœŸ˜:JšœœŸ˜*JšœŸ"˜6Jšœ˜™2Jšœ™Jšœ™Jšœ™———šž™Lšœ œ'˜7—šž™JšœΑ™ΑLšœœœ ˜šœ œœ˜šœœ˜Jšœ ˜ Jšœœ˜Jšœœ˜Jšœœ˜Jšœ˜—Jšœœ˜ Jšœ˜——šž™Lšœ œ˜*—šž™Lšœœœ˜J˜Jšœ œœ ˜!šœ œœ œ˜/Jšœ™—J˜Jšœœœ˜)šœœœ˜ Jšœ œŸ5˜KJšœŸ˜'JšœŸ+˜>Jšœ œŸ˜*J˜——šž ™ Jšœ œœ˜%šœœœ˜JšœœŸ‡˜žJšœœŸ4˜IJšœœŸ#˜9šœœ˜ Jšœ˜šœ˜JšœF™F—šœ œ˜J™#—šœœ˜ Jšœ!™!—šœ˜J™—šœ˜J™'—Jšœ˜—šœœ˜ J™‹—J˜—Jšœ œœ˜'šœœœ˜Jšœ œœ˜#Jšœ˜——Lšœ˜—…—Ζΰ