<> <> <> <> <<>> DIRECTORY Atom USING [PropList], ImagerColor USING [RGB], Vector3d USING [Pair], Pixels USING [PixelBuffer, SampleSet, SampleSetSequence]; ScanConvert: CEDAR DEFINITIONS ~ BEGIN <> PixelBuffer: TYPE ~ Pixels.PixelBuffer; RGB: TYPE ~ ImagerColor.RGB; -- RECORD[ r, g, b: REAL]; IntRGBT: TYPE ~ RECORD[ r, g, b, t: CARDINAL]; RealSequence: TYPE ~ RECORD [length: NAT _ 0, s: SEQUENCE maxLength: NAT OF REAL]; Pair: TYPE ~ Vector3d.Pair; -- RECORD[x, y: REAL]; IntPair: TYPE ~ RECORD[x, y: INTEGER]; IntPairSequence: TYPE ~ RECORD [length: NAT, pairs: SEQUENCE maxLength: NAT OF IntPair]; SampleSet: TYPE ~ Pixels.SampleSet; SampleSetSequence: TYPE ~ Pixels.SampleSetSequence; ScanConvertError: SIGNAL [reason: ATOM]; <> justNoticeable: REAL ~ 0.02; -- percentage intensity change for a just noticeable difference <> << A spot is the information necessary to compute one or more pixels over a given position in an image>> GetColorProc: TYPE ~ PROC[spot: Spot] RETURNS[RGB, REAL]; Spot: TYPE ~ RECORD[ x, y: NAT, -- screen coordinates coverage: REAL _ 1.0, -- percentage of pixel area covered by surface mask: CARDINAL _ LAST[CARDINAL], -- coding for position of covered area val: REF RealSequence _ NIL, -- interpolated values for shading yIncr: REF RealSequence _ NIL, -- vertical increments for interpolated values xIncr: REF RealSequence _ NIL, -- horizontal increments for interpolated values props: Atom.PropList _ NIL, -- catchall proc: GetColorProc _ NIL -- extracts color for painting display ]; SpotSequence: TYPE ~ RECORD [ length: NAT, spots: SEQUENCE maxLength: NAT OF Spot ]; <> Extend: PROC[ seq: REF RealSequence, newLength: NAT] RETURNS[REF RealSequence]; Power: PROC[ value: INTEGER, power: NAT] RETURNS[ result: INTEGER ]; DitheredRGB: PROC[renderMode: ATOM, x, y, red, grn, blu: INTEGER] RETURNS[INTEGER]; MappedRGB: PROC[renderMode: ATOM, clr: RGB] RETURNS[NAT]; RGBFromMap: PROC[renderMode: ATOM, value: NAT] RETURNS[RGB]; <> PutSpot: PROC [ buf: PixelBuffer, spot: Spot, op, renderMode: ATOM ]; GetSpot: PROC [ buf: PixelBuffer, spot: Spot, renderMode: ATOM ] RETURNS[ Spot ]; <> <> PutLine: PROC [buf: PixelBuffer, p1, p2: IntPair, color: SampleSet ]; <> <> ConstantPoly: PROC [buf: PixelBuffer, color: SampleSet, plygn: REF SpotSequence]; SmoothPoly: PROC [buf: PixelBuffer, plygn: REF SpotSequence, renderMode: ATOM]; ShinyPoly: PROC [buf: PixelBuffer, plygn: REF SpotSequence, shininess: NAT, renderMode: ATOM]; END.