<<>> <> <> <> <> <<>> DIRECTORY ColorizeViewPoint, Profiles, Real, SymTab; ColorizeViewPointBackdoor: CEDAR DEFINITIONS IMPORTS Real ~ BEGIN OPEN ColorizeViewPoint; <> Colorization: TYPE ~ PROC [ip: ROPE, palette: Profiles.Profile, checkSystemSetting: CheckSystemSettingProc, mapData: MapData] RETURNS [newIP: ROPE]; InstallNewColorization: PROC [colorization: Colorization, setting: Setting]; <> RegisterKeywords: PROC [keywordsList: LIST OF ROPE]; <> <<>> <> ColorizeColorVP, ColorizeBasicGraphics, ColorizeProIllustrator, ColorizeText: Colorization; <> <> SubpaletteSearchList: PROC [prefixesIn: LIST OF ROPE, profile: Profiles.Profile] RETURNS [allPrefixes: LIST OF ROPE]; <> GetRecursiveValue: PROC [key: ROPE, palette: Profiles.Profile, subpaletteList: LIST OF ROPE, mapData: MapData, levelsAllowed: INT _ INT.FIRST, customOnly, noMappings: BOOL _ FALSE] RETURNS [value: LIST OF ROPE _ NIL, levelsExceeded: BOOL _ FALSE]; <> SetProfileBoolean: PROC [profile: Profiles.Profile, key: ROPE, val: BOOL]; <> <> <> MappingProc: TYPE ~ PROC [valueIn: LIST OF ROPE, name: ROPE, palette: Profiles.Profile, data: REF _ NIL] RETURNS [mapped: LIST OF ROPE]; --takes, eg, an RGB value and returns a gray value of 1.0-(.253r+.684g+.063b). By convention, MappingProcs guarantee that values enclosed in {} will not be touched. name & data are from ColorMappingRep ColorMapping: TYPE ~ REF ColorMappingRep; ColorMappingRep: TYPE ~ RECORD [name: ROPE, mappingProc: MappingProc, setTrue: LIST OF ROPE, data: REF _ NIL, bad: BOOL _ FALSE]; --setTrue: some mappings need to register their activity by setting palette entries, eg "IP2: TRUE" for the mapping to Black&White. data may be needed by MappingProc. If mapping ever found bad (as in a bad formula supplied by user), bad is set. MapData: TYPE ~ REF MapDataRep; MapDataRep: TYPE ~ RECORD [installedMappings, requestedMappings: LIST OF ColorMapping, exceptionsPalette: Profiles.Profile--holds exceptions to the mappings--]; GetMappings: PROC [palette: Profiles.Profile] RETURNS [mapData: MapData]; << gets mappings specified by current document>> ApplyMappings: PROC [toMap: REF, palette: Profiles.Profile, mapData: MapData, mapOnly: ROPE _ NIL, subpaletteList: LIST OF ROPE _ NIL] RETURNS [mappedRope: ROPE _ NIL, mappedList: LIST OF ROPE _ NIL]; <> <> SampledColorIPFragments: TYPE ~ RECORD [ beforeTransform, afterTransform: ROPE _ NIL, sweepAngleMod360: [0..360) _ 0, --Determines the angle for the transformation removeDefiningObject: BOOL _ FALSE --Specifies whether to remove the object which spatially defines the sweep transformation ]; IPFragmentForColorSetting: PROC [def: LIST OF ROPE, palette: Profiles.Profile] RETURNS [frag: REF]; IPFragmentForColorDefinition: PROC [def: LIST OF ROPE, palette: Profiles.Profile] RETURNS [frag: REF]; <> <> <<>> IPRopeFromName: PROC [xeroxName: ROPE] RETURNS [header, ip: ROPE]; IPRopeFromRope: PROC [xeroxRope: ROPE] RETURNS [header, ip: ROPE]; <> <> <
> <> <> <> CleanupUserCommands: PROC [commands: ROPE, palette: Profiles.Profile] RETURNS [cleanCommands: ROPE]; <> LineProcessor: TYPE ~ PROC [line, in: ROPE] RETURNS [newLine: ROPE _ NIL]; ProcessLinesMatching: PROC [pattern, in: ROPE, lineProcessor: LineProcessor] RETURNS [new: ROPE]; <> <<>> AltRound: PROC [x: REAL] RETURNS [INT] ~ INLINE {RETURN [IF x<0.0 THEN Real.Fix[x-.5] ELSE Real.Fix[x+.5]]}; <> END.