0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_ColorCubeColorMap.cdl
1 -- Created on: 1993-03-23
2 -- Created by: BBL
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class ColorCubeColorMap from Aspect inherits ColorMap from Aspect
18
19         ---Version: 0.0
20
21         ---Purpose: This class defines a ColorCube ColorMap object.
22         ---Keywords:
23         ---Warning:
24         ---References:
25
26 uses
27         Color           from Quantity,
28         ColorMapEntry   from Aspect
29
30 raises
31         BadAccess       from Aspect,
32         RangeError from Standard
33
34 is
35         Create( base_pixel, redmax,   redmult,
36                             greenmax, greenmult,
37                             bluemax,  bluemult : in Integer from Standard )
38         returns mutable ColorCubeColorMap from Aspect
39         raises RangeError from Standard ;
40         ---Level: Public
41         ---Purpose : Create a ColorCube ColorMap.
42
43         ColorCubeDefinition( me : in ;
44                           base_pixel,
45                           redmax,   redmult,
46                           greenmax, greenmult,
47                           bluemax,  bluemult : out Integer from Standard );
48
49         FindColorMapIndex ( me ;
50                         AColorMapEntryIndex : Integer from Standard )
51         returns Integer from Standard
52         raises BadAccess from Aspect ;
53         ---Level: Public
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
57         --          ColorMap.
58
59         FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
60         returns ColorMapEntry from Aspect
61         raises BadAccess from Aspect ;
62         ---Level: Public
63         ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
64         --          equal to <AnEntryIndex>.
65         --  Warning: Raises BadAccess if the index is not defined in the
66         --          ColorMap.
67         ---C++: return const &
68
69         NearestColorMapIndex( me ; aColor : Color from Quantity )
70         returns Integer from Standard ;
71         ---Level: Public
72         ---Purpose: Returns the index in the ColorMap of the nearest
73         --          matching ColorMapEntry
74
75         NearestEntry( me ; aColor : Color from Quantity )
76         returns ColorMapEntry from Aspect ;
77         ---Level: Public
78         ---Purpose: Returns the nearest ColorMapEntry that match aColor .
79         ---C++: return const &
80
81         AddEntry (me : mutable; aColor : Color from Quantity)
82                 returns Integer from Standard;
83         ---Level: Public
84         ---Purpose: Search an identical color entry in the color map <me>
85         -- or returns the nearest ColorMapEntry Index.
86
87 fields
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.
93
94 end ColorCubeColorMap ;