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 ColorMapEntry from Aspect inherits Storable from Standard
21 ---Purpose: This class defines a colormap entry.
22 -- A colormap entry is an association between
23 -- a RGB object and a index in the colormap.
32 OutOfRange from Standard,
37 returns ColorMapEntry from Aspect;
39 ---Purpose: Creates an unallocated colormap entry
41 Create ( index : in Integer from Standard;
42 rgb : in Color from Quantity)
43 returns ColorMapEntry;
45 ---Purpose: Creates an allocated colormap entry
47 Create ( entry : in ColorMapEntry from Aspect )
50 ---Purpose: Creates an allocated colormap entry.
51 -- Warning: Raises error if the colormap entry <entry>
53 raises BadAccess from Aspect;
55 SetValue ( me: in out; index : in Integer from Standard;
56 rgb : in Color from Quantity );
58 ---Purpose: Sets colormap entry value and allocates it.
60 SetValue ( me: in out; entry : in ColorMapEntry from Aspect);
62 ---Purpose: Sets colormap entry value and allocates it.
63 ---C++: alias operator =
65 SetColor ( me: in out; rgb : in Color from Quantity );
67 ---Purpose: Sets color <rgb> of colormap entry.
69 Color ( me : in ) returns Color from Quantity
70 ---Warning: Raises error if the colormap entry is unallocated .
71 raises BadAccess from Aspect;
72 ---C++: return const &
74 SetIndex ( me: in out; index : in Integer from Standard);
76 ---Purpose: Sets index value of a colormap entry.
78 Index ( me : in ) returns Integer from Standard
79 ---Warning: Raises error if the colormap entry is unallocated .
80 raises BadAccess from Aspect;
84 ---Purpose: Unallocates the colormap entry.
86 IsAllocated ( me : in )
87 returns Boolean from Standard;
89 ---Purpose: Returns True if the colormap entry is allocated.
90 -- Warning: A colormap entry is allocated when the color and
91 -- the index is defined.
97 allocated : Boolean from Standard;
98 mycolor : Color from Quantity;
99 myindex : Integer from Standard;
100 myColorIsDef : Boolean from Standard;
101 myIndexIsDef : Boolean from Standard;
103 end ColorMapEntry from Aspect;