<> <> <> <> <> <<>> DIRECTORY Basics USING [LongMult], PrincOps USING [DstFunc, SrcFunc]; PDInterpBitmap: DEFINITIONS IMPORTS Basics = BEGIN <<>> <> -- ^ -- f | -- | -- | +----------------------------+ -- | | | -- | |rast * bitsPerWord / bitsPerPixel | -- | | | -- | | +------------+ | -- | | | | | -- | | | | | -- | | |fSize | | -- | | | | | -- | | sMin | sSize | | -- | |<-- -->+------------+ | -- | | ^ | -- | | |fMin | -- | sOrigin | v lines | -- |<-------->+----------------------------+ -- | ^origin of buffer -- | | -- | |fOrigin -- | | -- | | -- | v -- +--------------------------------------------> -- Device space origin s <<>> <> BitmapDesc: TYPE = RECORD [ <> sOrigin, fOrigin: INTEGER _ 0, sMin, fMin: INTEGER _ 0, sSize, fSize: NAT _ 0, pointer: LONG POINTER _ NIL, rast, lines: CARDINAL _ 0 <> ]; Rectangle: TYPE = RECORD [sMin, fMin: INTEGER, sSize, fSize: NAT]; RasterWords: PROC [bitmapDesc: BitmapDesc] RETURNS [INT] = INLINE { RETURN [Basics.LongMult[bitmapDesc.rast, bitmapDesc.lines]]; }; Reshape: PROC [pointer: LONG POINTER, words: INT, bounds: Rectangle] RETURNS [BitmapDesc]; <> InsufficientSpace: ERROR; Intersect: PROC [a, b: Rectangle] RETURNS [Rectangle]; <> Clear: PROC [bitmapDesc: BitmapDesc]; <> ShiftMap: PROC [p: BitmapDesc, s, f: INTEGER] RETURNS [BitmapDesc]; <> ShiftWindow: PROC [p: BitmapDesc, s, f: INTEGER] RETURNS [BitmapDesc]; <> Clip: PROC [p: BitmapDesc, bounds: Rectangle] RETURNS [BitmapDesc]; <> SetWindow: PROC [p: BitmapDesc, bounds: Rectangle] RETURNS [BitmapDesc]; <> Window: PROC [p: BitmapDesc] RETURNS [Rectangle]; BufferBounds: PROC [p: BitmapDesc] RETURNS [Rectangle]; <> BoundedWindow: PROC [p: BitmapDesc] RETURNS [Rectangle]; <> Fill: PROC [dest: BitmapDesc, area: Rectangle, value: CARDINAL, function: Function _ [null, null]]; Function: TYPE = RECORD [dstFunc: PrincOps.DstFunc, srcFunc: PrincOps.SrcFunc]; <<[null, null] makes zero bits white, one bits black>> <<[or, null] makes zero bits transparent, one bits black>> <<[and, null] makes zero bits white, one bits black>> <<[and, complement] makes zero bits transparent, one bits white>> <<[xor, null] makes zero bits transparent, one bits inverted>> <> Transfer: PROC [dest, source: BitmapDesc, function: Function _ [null, null]]; <> Tile: TYPE = RECORD [ sOrigin, fOrigin: INTEGER, sSize, fSize: NAT, phase: INTEGER, pointer: LONG POINTER, rast, lines: CARDINAL ]; <> CreateTile: PROC [rectangle: Rectangle, phase: INTEGER _ 0, rasterPointer: LONG POINTER, scratchPointer: LONG POINTER _ NIL, scratchWords: INT _ 0] RETURNS [tile: Tile]; <> TransferTile: PROC [dest: BitmapDesc, tile: Tile, function: Function _ [null, null]]; <> <<>> END.