DIRECTORY Scaled USING [Value]; newImagerBasic: 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]; nullBox: IntRectangle = [FIRST[INTEGER], FIRST[INTEGER], FIRST[INTEGER], FIRST[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}; PathMapType: TYPE = PROC[ data: REF, move: PROC[p: Pair], line: PROC[p: Pair], curve: PROC[p1, p2, p3: Pair], conic: PROC[p1, p2: Pair, r: REAL] ]; PathClosure: TYPE = RECORD[map: PathMapType, data: REF]; 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 maxSampleValue: INT, -- the range of sample values is [0..maxSampleValue] samplesPerPixel: INT, -- number of samples for each pixel m: Transformation, -- transformation to client space (see Interpress, section 4.6) 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. önewImagerBasic.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 Wyatt, September 21, 1983 10:10 am 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 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. Êܘšœ™J™—J™TJ™šœ™Jšœ(™(J™"—J˜šÏk ˜ Jšœœ ˜—J˜Jšœœ ˜!Jšœ˜J™šœ&™&J™Jšœœœœ˜!Jšœ œœœ˜'Jšœœœ˜!Jšœ œœ˜'Jšœ œœœ˜,Jšœœœœ˜2Jšœœœœœœœœœ˜YJšœœœÏc*˜X—J™šœ™J™Jšœœ^˜qJ˜šœœœž˜:Jšœœž˜*Jšœž"˜6Jšœ˜™2Jšœ™Jšœ™Jšœ™———J™šœ™J™Jšœ œ'˜7—J™™J™šœ œœ˜Jšœœ˜ Jšœœ ˜Jšœœ ˜Jšœœ˜Jšœœœ˜"Jšœ˜J˜—Jšœ œœœ˜8J˜—šœ™J™Jšœ œ˜)—J™šœ™J™Jšœœœ˜J˜Jšœ œœ ˜!š œ œœœœ˜/Jšœ™—J˜Jšœœœ˜)šœœœ˜ Jšœ œž5˜KJšœž˜'Jšœž+˜>Jšœ œž˜*J˜——J™šœ ™ J™Jšœ œœ˜%šœœœ˜Jšœœž%˜