DIRECTORY ImagerPixelMap USING [PixelMap, PixelMapRep], ImagerSample USING [Sample, SampleBuffer, UnsafeSamples], PrincOps USING [DstFunc, SrcFunc], Rope USING [ROPE]; PixelMapOps: CEDAR DEFINITIONS ~ BEGIN OPEN ImagerPixelMap, ImagerSample, Rope; GetF: PROC [pixelMap: PixelMap, s: INTEGER, f: INTEGER, buffer: SampleBuffer, bi: NAT, bj: NAT, count: NAT]; PutF: PROC [pixelMap: PixelMap, s: INTEGER, f: INTEGER, buffer: SampleBuffer, bi: NAT, bj: NAT, count: NAT, srcFunc: PrincOps.SrcFunc _ null, dstFunc: PrincOps.DstFunc _ null]; GetS: PROC [pixelMap: PixelMap, s: INTEGER, f: INTEGER, buffer: SampleBuffer, bi: NAT, bj: NAT, count: NAT]; PutS: PROC [pixelMap: PixelMap, s: INTEGER, f: INTEGER, buffer: SampleBuffer, bi: NAT, bj: NAT, count: NAT, srcFunc: PrincOps.SrcFunc _ null, dstFunc: PrincOps.DstFunc _ null]; ClearSamples: PROC [buffer: SampleBuffer, i, j: NAT _ 0, count: NAT]; FillSamples: PROC [buffer: SampleBuffer, i, j: NAT _ 0, count: NAT, sample: Sample]; CopySamples: PROC [buffer: SampleBuffer, bi, bj: NAT _ 0, count: NAT, source: SampleBuffer, si, sj: NAT _ 0]; Halftone: PROC [pixelMap: PixelMap, s: INTEGER, f: INTEGER, samples, thresholds: UnsafeSamples, count: NAT, invertOutput: BOOL _ FALSE, transparent: BOOL _ FALSE]; UnsafeHalftone: UNSAFE PROC [samples, thresholds: UnsafeSamples, count: NAT, base: LONG POINTER, wordsPerLine: NAT, s, f: NAT _ 0, invertOutput: BOOL _ FALSE, transparent: BOOL _ FALSE]; BoxFilter: PROC [pixelMap: PixelMap, sSizeBox, fSizeBox: [0..256), wrap: BOOL _ TRUE]; ChangeBitsPerPixel: PROC [pixelMap: PixelMap, newLgBitsPerPixel: [0..4], scratch: REF PixelMapRep _ NIL] RETURNS [PixelMap]; ChangeContrast: PROC [pixelMap: PixelMap, oldminvalue, oldmaxvalue, newminvalue, newmaxvalue: REAL]; AISData: TYPE ~ RECORD [ pixelMap: PixelMap, bitmap: BOOL, comment: ROPE ]; LoadAIS: PROC [aisName: ROPE] RETURNS [AISData]; ReadAIS: PROC [pixelMap: PixelMap, aisName: ROPE]; StoreAIS: PROC [aisName: ROPE, aisData: AISData]; END. PixelMapOps.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Michael Plass, October 7, 1985 11:46:06 am PDT Auxillary operations for ImagerPixelMap and ImagerSample interfaces. The get and put operations in this interface do not clip against the pixelMap window; they do perform bounds checks to prevent access to non-existent parts of the raster. FOR k: NAT IN[0..count) DO buffer.PutSample[bi, bj+k, pixelMap.GetPixel[s, f+k]] ENDLOOP; FOR k: NAT IN[0..count) DO pixelMap.Fill[[s, f+k, 1, 1], buffer.GetSample[bi, bj+k], [dstFunc, srcFunc]] ENDLOOP; FOR k: NAT IN[0..count) DO buffer.PutSample[bi, bj+k, pixelMap.GetPixel[s+k, f]] ENDLOOP; FOR k: NAT IN[0..count) DO pixelMap.Fill[[s+k, f, 1, 1], buffer.GetSample[bi, bj+k], [dstFunc, srcFunc]] ENDLOOP; ΚL˜™Icodešœ Οmœ1™