b311480e |
1 | -- Created on: 1993-03-23 |
2 | -- Created by: BBL |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
7fd59977 |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
7fd59977 |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class ColorMapEntry from Aspect inherits Storable from Standard |
18 | |
19 | ---Version: 0.0 |
20 | |
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. |
24 | ---Keywords: |
25 | ---Warning: |
26 | ---References: |
27 | |
28 | uses |
29 | Color from Quantity |
30 | |
31 | raises |
32 | OutOfRange from Standard, |
33 | BadAccess from Aspect |
34 | |
35 | is |
36 | Create |
37 | returns ColorMapEntry from Aspect; |
38 | ---Level: Public |
39 | ---Purpose: Creates an unallocated colormap entry |
40 | |
41 | Create ( index : in Integer from Standard; |
42 | rgb : in Color from Quantity) |
43 | returns ColorMapEntry; |
44 | ---Level: Public |
45 | ---Purpose: Creates an allocated colormap entry |
46 | |
47 | Create ( entry : in ColorMapEntry from Aspect ) |
48 | returns ColorMapEntry |
49 | ---Level: Public |
50 | ---Purpose: Creates an allocated colormap entry. |
51 | -- Warning: Raises error if the colormap entry <entry> |
52 | -- is unallocated. |
53 | raises BadAccess from Aspect; |
54 | |
55 | SetValue ( me: in out; index : in Integer from Standard; |
56 | rgb : in Color from Quantity ); |
57 | ---Level: Public |
58 | ---Purpose: Sets colormap entry value and allocates it. |
59 | |
60 | SetValue ( me: in out; entry : in ColorMapEntry from Aspect); |
61 | ---Level: Public |
62 | ---Purpose: Sets colormap entry value and allocates it. |
63 | ---C++: alias operator = |
64 | |
65 | SetColor ( me: in out; rgb : in Color from Quantity ); |
66 | ---Level: Public |
67 | ---Purpose: Sets color <rgb> of colormap entry. |
68 | |
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 & |
73 | |
74 | SetIndex ( me: in out; index : in Integer from Standard); |
75 | ---Level: Public |
76 | ---Purpose: Sets index value of a colormap entry. |
77 | |
78 | Index ( me : in ) returns Integer from Standard |
79 | ---Warning: Raises error if the colormap entry is unallocated . |
80 | raises BadAccess from Aspect; |
81 | |
82 | Free ( me : in out ); |
83 | ---Level: Public |
84 | ---Purpose: Unallocates the colormap entry. |
85 | |
86 | IsAllocated ( me : in ) |
87 | returns Boolean from Standard; |
88 | ---Level: Public |
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. |
92 | |
93 | Dump( me : in ) ; |
94 | ---Level: Internal |
95 | |
96 | fields |
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; |
102 | |
103 | end ColorMapEntry from Aspect; |