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 GenericColorMap from Aspect inherits ColorMap from Aspect
27 ---Purpose: This class defines a GenericColorMap object.
34 TypeOfColorMap from Aspect,
35 ColorMapEntry from Aspect,
36 DataMapOfIntegerInteger from TColStd
45 returns mutable GenericColorMap from Aspect;
47 ---Purpose: Creates a generic ColorMap .
49 AddEntry (me : mutable; AnEntry : ColorMapEntry from Aspect)
51 ---Purpose: Adds an entry in the color map <me>.
52 -- Warning: Raises BadAccess if the ColorMapEntry index is alreadry
54 raises BadAccess from Aspect;
56 AddEntry (me : mutable; aColor : Color from Quantity)
57 returns Integer from Standard;
59 ---Purpose: Search an identical color entry in the color map <me>
60 -- and returns the ColorMapEntry Index if exist.
61 -- Or add a new entry and returns the computed ColorMapEntry index used.
62 RemoveEntry ( me: mutable;
63 AColorMapEntryIndex : Integer from Standard )
64 raises BadAccess from Aspect ;
66 ---Purpose: Remove the ColorMapEntry at position index in the ColorMap
67 -- Warning: Raises BadAccess if the index is not defined in the
70 FindColorMapIndex ( me ; AColorMapEntryIndex : Integer from Standard )
71 returns Integer from Standard
72 raises BadAccess from Aspect ;
74 ---Purpose: Returns the index in the ColorMap of the
75 -- ColorMapEntry.Index() equal to <AnEntryIndex>.
76 -- Warning: Raises BadAccess if the index is not defined in the
79 FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
80 returns ColorMapEntry from Aspect
81 raises BadAccess from Aspect ;
83 ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
84 -- equal to <AnEntryIndex>.
85 -- Warning: Raises BadAccess if the index is not defined in the
87 ---C++: return const &
89 NearestColorMapIndex( me ; aColor : Color from Quantity )
90 returns Integer from Standard ;
92 ---Purpose: Returns the index in the ColorMap of the
93 -- nearest matching ColorMapEntry
95 NearestEntry( me ; aColor : Color from Quantity )
96 returns ColorMapEntry from Aspect ;
98 ---Purpose: Returns the nearest ColorMapEntry that match aColor .
99 ---C++: return const &
103 myDataMap : DataMapOfIntegerInteger from TColStd is protected;