DIRECTORY GraphicsBasic USING [Color]; CGColorWithCIE: CEDAR DEFINITIONS = { Color: TYPE = GraphicsBasic.Color; GetStipple: PROC[color: Color] RETURNS[CARDINAL] = INLINE { RETURN[color.g*256+color.b] }; -- get a color's stipple pattern, assuming color.tag = stipple --h=undefined means it's a gray. InvalidColor, Uninitialized: SIGNAL; undefined: REAL = -1; HSVToRGB: PROC[h, s, v: REAL] RETURNS[r, g, b: REAL]; RGBToHSV: PROC[r, g, b: REAL] RETURNS[h, s, v: REAL]; HSLToRGB: PROC[h, s, l: REAL] RETURNS[r, g, b: REAL]; RGBToHSL: PROC[r, g, b: REAL] RETURNS[h, s, l: REAL]; InitCIE: PROC[xr,yr,xg,yg,xb,yb: REAL, whiteY: REAL _ 1]; PhosphorType: TYPE = {long,normal}; InitDefaultCIE: PROC[type: PhosphorType _ long]; GetDefaultValues: PROC[type: PhosphorType] RETURNS[xr,yr,xg,yg,xb,yb: REAL]; SetDefaultValues: PROC[xr,yr,xg,yg,xb,yb: REAL, type: PhosphorType]; CIEToRGB: PROC[x,y, Y: REAL] RETURNS[r, g, b: REAL]; GetMaxY: PUBLIC PROC[x,y: REAL] RETURNS[Y: REAL]; RGBToCIE: PROC[r, g, b: REAL] RETURNS [x,y, Y: REAL]; }. tCGColorWithCIE.mesa Last edited by Maureen Stone, September 19, 1983 4:05 pm Last edited by Doug Wyatt, August 31, 1982 2:50 pm Last Edited by: Beach, February 13, 1984 2:20:49 pm PST The following convert between (hue, saturation, value) or (hue, saturation, lightness) and (red, green, blue). All REALs except h should be in the range [0..1]. --HSV hexacone model. --HSL double hexacone model. The following convert between (red, green, blue) and (x,y) chromaticity coordinates. Initialize the transform with x,y for red, green blue plus Y. Y can default to 1 if you're not matching the monitor to anything else. CIEToRGB and RGBToCIE will signal Uninitialized if InitCIE has not been called add more info hear for real cie. Need two more values? default values for long and short persistance phosphors add more info hear for real cie used to clip values of Y for CIEToRGB Κ˜procšœ™Kšœ8™8Kšœ2™2—J™7K™KšΟk œœ ˜)Kšœœ œ˜&Kšœœ˜#Kš Οn œœœœœœΟc?˜šKšœn™nKšœ1™1KšŸ!˜!Kšœœ˜$Kšœ œ˜Kš žœœ œœ œ˜5š žœœ œœ œ˜5Kšœ™—Kš žœœ œœ œ˜5š žœœ œœ œ˜5Kšœ™—KšœT™TKšœ†™†Kšžœžœ9™NKšžœœœ œ˜9Kšœ6™6Kšœœ˜#Kšžœœ˜0Kšœ7™7Kšžœœœœ˜LKšžœœœ˜EKšœ™Kš žœœœœœ œ˜4Kš žœœœœœœ˜1Kšœ%™%Kš žœœ œœœœ˜5K˜Kšœ˜J˜—…— “