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.
23 class ColorMapEntry from Aspect inherits Storable from Standard
27 ---Purpose: This class defines a colormap entry.
28 -- A colormap entry is an association between
29 -- a RGB object and a index in the colormap.
38 OutOfRange from Standard,
43 returns ColorMapEntry from Aspect;
45 ---Purpose: Creates an unallocated colormap entry
47 Create ( index : in Integer from Standard;
48 rgb : in Color from Quantity)
49 returns ColorMapEntry;
51 ---Purpose: Creates an allocated colormap entry
53 Create ( entry : in ColorMapEntry from Aspect )
56 ---Purpose: Creates an allocated colormap entry.
57 -- Warning: Raises error if the colormap entry <entry>
59 raises BadAccess from Aspect;
61 SetValue ( me: in out; index : in Integer from Standard;
62 rgb : in Color from Quantity );
64 ---Purpose: Sets colormap entry value and allocates it.
66 SetValue ( me: in out; entry : in ColorMapEntry from Aspect);
68 ---Purpose: Sets colormap entry value and allocates it.
69 ---C++: alias operator =
71 SetColor ( me: in out; rgb : in Color from Quantity );
73 ---Purpose: Sets color <rgb> of colormap entry.
75 Color ( me : in ) returns Color from Quantity
76 ---Warning: Raises error if the colormap entry is unallocated .
77 raises BadAccess from Aspect;
78 ---C++: return const &
80 SetIndex ( me: in out; index : in Integer from Standard);
82 ---Purpose: Sets index value of a colormap entry.
84 Index ( me : in ) returns Integer from Standard
85 ---Warning: Raises error if the colormap entry is unallocated .
86 raises BadAccess from Aspect;
90 ---Purpose: Unallocates the colormap entry.
92 IsAllocated ( me : in )
93 returns Boolean from Standard;
95 ---Purpose: Returns True if the colormap entry is allocated.
96 -- Warning: A colormap entry is allocated when the color and
97 -- the index is defined.
103 allocated : Boolean from Standard;
104 mycolor : Color from Quantity;
105 myindex : Integer from Standard;
106 myColorIsDef : Boolean from Standard;
107 myIndexIsDef : Boolean from Standard;
109 end ColorMapEntry from Aspect;