0023024: Update headers of OCCT files
[occt.git] / src / Aspect / Aspect_ColorRampColorMap.cdl
1 -- Created on: 1993-03-23
2 -- Created by: BBL
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
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.
10 --
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.
13 --
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.
20
21
22 class ColorRampColorMap from Aspect inherits ColorMap from Aspect
23
24         ---Version: 0.0
25
26         ---Purpose: This class defines a ColorRampColorMap object.
27         ---Keywords:
28         ---Warning:
29         ---References:
30
31 uses
32         Color           from Quantity,
33         NameOfColor     from Quantity,
34         ColorMapEntry   from Aspect
35
36 raises
37         RangeError from Standard,
38         BadAccess       from Aspect
39
40 is
41         Create( basepixel,dimension  : in Integer from Standard ;
42                 color                : in Color from Quantity )
43                 returns mutable ColorRampColorMap from Aspect
44                 raises RangeError from Standard ;
45         ---Level: Public
46         ---Purpose : Create a Color Ramp Colormap starting from Black at
47         --           basepixel to color at basepixel+dimension-1.
48
49         Create( basepixel,dimension  : in Integer     from Standard ;
50                 colorName            : in NameOfColor from Quantity )
51                 returns mutable ColorRampColorMap from Aspect
52                 raises RangeError from Standard ;
53         ---Level: Public
54         ---Purpose : Create a Color Ramp Colormap starting from Black at
55         --           basepixel to color at basepixel+dimension-1.
56
57         ColorRampDefinition( me : in ;
58                         basepixel,dimension : out Integer from Standard ;
59                         color : out Color from Quantity ) ;
60         ---Level: Public
61         ---Purpose : Get  Color Ramp Colormap definition .
62
63         ComputeEntry( me : in out mutable ;
64                       basepixel,dimension  : in Integer from Standard ;
65                       color                : in Color from Quantity )
66                 raises RangeError from Standard is private ;
67         ---Level: Public
68         ---Purpose : Create a Color Ramp Colormap starting from Black at
69         --           basepixel to color at basepixel+dimension-1.
70
71         FindColorMapIndex ( me ;
72                             ColorMapEntryIndex : Integer from Standard )
73                 returns Integer from Standard
74                 raises BadAccess from Aspect ;
75         ---Level: Public
76         ---Purpose: Returns the index in the ColorMap of the 
77         --          ColorMapEntry.Index() equal to <AnEntryIndex>.
78         --  Warning: Raises BadAccess if the index is not defined in the
79         --          ColorMap.
80
81         FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
82                 returns ColorMapEntry from Aspect
83                 raises BadAccess from Aspect ;
84         ---Level: Public
85         ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
86         --          equal to <AnEntryIndex>.
87         --  Warning: Raises BadAccess if the index is not defined in the
88         --          ColorMap.
89         ---C++: return const &
90
91         NearestColorMapIndex( me ; aColor : Color from Quantity )
92                 returns Integer from Standard ;
93         ---Level: Public
94         ---Purpose: Returns the index in the ColorMap of the
95         --          nearest matching ColorMapEntry 
96
97         NearestEntry( me ; aColor : Color from Quantity )
98                 returns ColorMapEntry from Aspect ;
99         ---Level: Public
100         ---Purpose: Returns the nearest ColorMapEntry that match aColor .
101         ---C++: return const &
102
103         AddEntry (me : mutable; aColor : Color from Quantity)
104                 returns Integer from Standard;
105         ---Level: Public
106         ---Purpose: Search an identical color entry in the color map <me>
107         -- or returns the nearest ColorMapEntry Index.
108
109 fields
110         mycolor     : Color     from Quantity ;
111         mybasepixel : Integer   from Standard ;
112         mydimension : Integer   from Standard ;
113
114 end ColorRampColorMap ;