2 -- File: Aspect_ColorCubeColorMap.cdl
6 ---Copyright: MatraDatavision 1993
9 class ColorCubeColorMap from Aspect inherits ColorMap from Aspect
13 ---Purpose: This class defines a ColorCube ColorMap object.
20 ColorMapEntry from Aspect
23 BadAccess from Aspect,
24 RangeError from Standard
27 Create( base_pixel, redmax, redmult,
29 bluemax, bluemult : in Integer from Standard )
30 returns mutable ColorCubeColorMap from Aspect
31 raises RangeError from Standard ;
33 ---Purpose : Create a ColorCube ColorMap.
35 ColorCubeDefinition( me : in ;
39 bluemax, bluemult : out Integer from Standard );
41 FindColorMapIndex ( me ;
42 AColorMapEntryIndex : Integer from Standard )
43 returns Integer from Standard
44 raises BadAccess from Aspect ;
46 ---Purpose: Returns the index in the ColorMap of the
47 -- ColorMapEntry.Index() equal to <AnEntryIndex>.
48 -- Warning: Raises BadAccess if the index is not defined in the
51 FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
52 returns ColorMapEntry from Aspect
53 raises BadAccess from Aspect ;
55 ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
56 -- equal to <AnEntryIndex>.
57 -- Warning: Raises BadAccess if the index is not defined in the
59 ---C++: return const &
61 NearestColorMapIndex( me ; aColor : Color from Quantity )
62 returns Integer from Standard ;
64 ---Purpose: Returns the index in the ColorMap of the nearest
65 -- matching ColorMapEntry
67 NearestEntry( me ; aColor : Color from Quantity )
68 returns ColorMapEntry from Aspect ;
70 ---Purpose: Returns the nearest ColorMapEntry that match aColor .
71 ---C++: return const &
73 AddEntry (me : mutable; aColor : Color from Quantity)
74 returns Integer from Standard;
76 ---Purpose: Search an identical color entry in the color map <me>
77 -- or returns the nearest ColorMapEntry Index.
80 mybasepixel : Integer from Standard ;
81 mygreenmax , mygreenmult : Integer from Standard ;
82 myredmax , myredmult : Integer from Standard ;
83 mybluemax , mybluemult : Integer from Standard ;
84 -- ColorCube definition for a ColorCube ColorMap.
86 end ColorCubeColorMap ;