1 -- Created on: 1993-03-23
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class GenericColorMap from Aspect inherits ColorMap from Aspect
22 ---Purpose: This class defines a GenericColorMap object.
29 TypeOfColorMap from Aspect,
30 ColorMapEntry from Aspect,
31 DataMapOfIntegerInteger from TColStd
40 returns GenericColorMap from Aspect;
42 ---Purpose: Creates a generic ColorMap .
44 AddEntry (me : mutable; AnEntry : ColorMapEntry from Aspect)
46 ---Purpose: Adds an entry in the color map <me>.
47 -- Warning: Raises BadAccess if the ColorMapEntry index is alreadry
49 raises BadAccess from Aspect;
51 AddEntry (me : mutable; aColor : Color from Quantity)
52 returns Integer from Standard;
54 ---Purpose: Search an identical color entry in the color map <me>
55 -- and returns the ColorMapEntry Index if exist.
56 -- Or add a new entry and returns the computed ColorMapEntry index used.
57 RemoveEntry ( me: mutable;
58 AColorMapEntryIndex : Integer from Standard )
59 raises BadAccess from Aspect ;
61 ---Purpose: Remove the ColorMapEntry at position index in the ColorMap
62 -- Warning: Raises BadAccess if the index is not defined in the
65 FindColorMapIndex ( me ; AColorMapEntryIndex : Integer from Standard )
66 returns Integer from Standard
67 raises BadAccess from Aspect ;
69 ---Purpose: Returns the index in the ColorMap of the
70 -- ColorMapEntry.Index() equal to <AnEntryIndex>.
71 -- Warning: Raises BadAccess if the index is not defined in the
74 FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
75 returns ColorMapEntry from Aspect
76 raises BadAccess from Aspect ;
78 ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
79 -- equal to <AnEntryIndex>.
80 -- Warning: Raises BadAccess if the index is not defined in the
82 ---C++: return const &
84 NearestColorMapIndex( me ; aColor : Color from Quantity )
85 returns Integer from Standard ;
87 ---Purpose: Returns the index in the ColorMap of the
88 -- nearest matching ColorMapEntry
90 NearestEntry( me ; aColor : Color from Quantity )
91 returns ColorMapEntry from Aspect ;
93 ---Purpose: Returns the nearest ColorMapEntry that match aColor .
94 ---C++: return const &
98 myDataMap : DataMapOfIntegerInteger from TColStd is protected;