1 -- Created on: 1993-03-23
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 class ColorCubeColorMap from Aspect inherits ColorMap from Aspect
26 ---Purpose: This class defines a ColorCube ColorMap object.
33 ColorMapEntry from Aspect
36 BadAccess from Aspect,
37 RangeError from Standard
40 Create( base_pixel, redmax, redmult,
42 bluemax, bluemult : in Integer from Standard )
43 returns mutable ColorCubeColorMap from Aspect
44 raises RangeError from Standard ;
46 ---Purpose : Create a ColorCube ColorMap.
48 ColorCubeDefinition( me : in ;
52 bluemax, bluemult : out Integer from Standard );
54 FindColorMapIndex ( me ;
55 AColorMapEntryIndex : Integer from Standard )
56 returns Integer from Standard
57 raises BadAccess from Aspect ;
59 ---Purpose: Returns the index in the ColorMap of the
60 -- ColorMapEntry.Index() equal to <AnEntryIndex>.
61 -- Warning: Raises BadAccess if the index is not defined in the
64 FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
65 returns ColorMapEntry from Aspect
66 raises BadAccess from Aspect ;
68 ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
69 -- equal to <AnEntryIndex>.
70 -- Warning: Raises BadAccess if the index is not defined in the
72 ---C++: return const &
74 NearestColorMapIndex( me ; aColor : Color from Quantity )
75 returns Integer from Standard ;
77 ---Purpose: Returns the index in the ColorMap of the nearest
78 -- matching ColorMapEntry
80 NearestEntry( me ; aColor : Color from Quantity )
81 returns ColorMapEntry from Aspect ;
83 ---Purpose: Returns the nearest ColorMapEntry that match aColor .
84 ---C++: return const &
86 AddEntry (me : mutable; aColor : Color from Quantity)
87 returns Integer from Standard;
89 ---Purpose: Search an identical color entry in the color map <me>
90 -- or returns the nearest ColorMapEntry Index.
93 mybasepixel : Integer from Standard ;
94 mygreenmax , mygreenmult : Integer from Standard ;
95 myredmax , myredmult : Integer from Standard ;
96 mybluemax , mybluemult : Integer from Standard ;
97 -- ColorCube definition for a ColorCube ColorMap.
99 end ColorCubeColorMap ;