<<>> <> <> <> DIRECTORY ImagerDevice USING [Device], ImagerColorPrivate USING [ColorPoint], Prop USING [PropList]; ImagerDeviceColor: CEDAR DEFINITIONS ~ BEGIN LookupTable: TYPE = REF LookupTableRep; LookupTableRep: TYPE = RECORD [SEQUENCE size: NAT OF REAL]; <> <> ColorLookupTableType: TYPE = {redTransfer, greenTransfer, blueTransfer, grayTransfer, blackGeneration, undercolorRemoval, spare1, spare2, spare3}; <> <> <> <> <> <> <> <> <> DeviceColorControl: TYPE = REF DeviceColorControlRep; DeviceColorControlRep: TYPE = RECORD [ table: ARRAY ColorLookupTableType OF LookupTable, allIdentity: BOOL ¬ TRUE, -- true only if all the transfer functions are identity. setLookupTable: SetLookupTableProc ¬, stamp: CARD ¬ 0, propList: Prop.PropList ¬ NIL, private: REF PrivateRep ¬ NIL ]; PrivateRep: TYPE; GetDeviceColorControl: PROC [device: ImagerDevice.Device] RETURNS [DeviceColorControl]; <> SetLookupTableProc: TYPE = PROC [control: DeviceColorControl, which: ColorLookupTableType, table: LookupTable]; SetLookupTable: SetLookupTableProc = INLINE { control.setLookupTable[control, which, table] }; <> <<>> DefaultSetLookupTable: PROC [control: DeviceColorControl, which: ColorLookupTableType, table: LookupTable]; <> LookupReal: PROC [table: LookupTable, real: REAL] RETURNS [REAL]; <> LookupFlipped: PROC [table: LookupTable, real: REAL] RETURNS [REAL]; <> ColorPoint: TYPE = ImagerColorPrivate.ColorPoint; <> CMYKFromCMYK: PUBLIC PROC [control: DeviceColorControl, c, m, y, k: REAL, maxOut: REAL, out: ColorPoint]; <> <<>> CMYKFromCMY: PUBLIC PROC [control: DeviceColorControl, c, m, y: REAL, maxOut: REAL, out: ColorPoint]; <> <<>> CMYKFromRGB: PUBLIC PROC [control: DeviceColorControl, r, g, b: REAL, maxOut: REAL, out: ColorPoint]; <> <<>> RGBFromRGB: PUBLIC PROC [control: DeviceColorControl, r, g, b: REAL, maxOut: REAL, out: ColorPoint]; <> <<>> RGBFromCMYK: PUBLIC PROC [control: DeviceColorControl, c, m, y, k: REAL, maxOut: REAL, out: ColorPoint]; <> <<>> YFromY: PUBLIC PROC [control: DeviceColorControl, Y: REAL, maxOut: REAL, out: ColorPoint]; <> CMYKFromY: PUBLIC PROC [control: DeviceColorControl, Y: REAL, maxOut: REAL, out: ColorPoint]; <> KFromY: PUBLIC PROC [control: DeviceColorControl, Y: REAL, maxOut: REAL, out: ColorPoint]; <> END.