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
9 -- under the terms of the GNU Lesser General Public 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 ColorCubeColorMap from Aspect inherits ColorMap from Aspect
21 ---Purpose: This class defines a ColorCube ColorMap object.
28 ColorMapEntry from Aspect
31 BadAccess from Aspect,
32 RangeError from Standard
35 Create( base_pixel, redmax, redmult,
37 bluemax, bluemult : in Integer from Standard )
38 returns mutable ColorCubeColorMap from Aspect
39 raises RangeError from Standard ;
41 ---Purpose : Create a ColorCube ColorMap.
43 ColorCubeDefinition( me : in ;
47 bluemax, bluemult : out Integer from Standard );
49 FindColorMapIndex ( me ;
50 AColorMapEntryIndex : Integer from Standard )
51 returns Integer from Standard
52 raises BadAccess from Aspect ;
54 ---Purpose: Returns the index in the ColorMap of the
55 -- ColorMapEntry.Index() equal to <AnEntryIndex>.
56 -- Warning: Raises BadAccess if the index is not defined in the
59 FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
60 returns ColorMapEntry from Aspect
61 raises BadAccess from Aspect ;
63 ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
64 -- equal to <AnEntryIndex>.
65 -- Warning: Raises BadAccess if the index is not defined in the
67 ---C++: return const &
69 NearestColorMapIndex( me ; aColor : Color from Quantity )
70 returns Integer from Standard ;
72 ---Purpose: Returns the index in the ColorMap of the nearest
73 -- matching ColorMapEntry
75 NearestEntry( me ; aColor : Color from Quantity )
76 returns ColorMapEntry from Aspect ;
78 ---Purpose: Returns the nearest ColorMapEntry that match aColor .
79 ---C++: return const &
81 AddEntry (me : mutable; aColor : Color from Quantity)
82 returns Integer from Standard;
84 ---Purpose: Search an identical color entry in the color map <me>
85 -- or returns the nearest ColorMapEntry Index.
88 mybasepixel : Integer from Standard ;
89 mygreenmax , mygreenmult : Integer from Standard ;
90 myredmax , myredmult : Integer from Standard ;
91 mybluemax , mybluemult : Integer from Standard ;
92 -- ColorCube definition for a ColorCube ColorMap.
94 end ColorCubeColorMap ;