1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _BGFX_COLOR_BCOLORTOOLS_HXX
25 #define _BGFX_COLOR_BCOLORTOOLS_HXX
26 
27 #include <sal/types.h>
28 
29 //////////////////////////////////////////////////////////////////////////////
30 
31 namespace basegfx
32 {
33     class BColor;
34 
35     namespace tools
36     {
37         /// Transform from RGB to HSL
38         BColor rgb2hsl(const BColor& rRGBColor);
39         /// Transform from HSL to RGB
40         BColor hsl2rgb(const BColor& rHSLColor);
41 
42         /// Transform from RGB to HSV
43         BColor rgb2hsv(const BColor& rRGBColor);
44         /// Transform from HSV to RGB
45         BColor hsv2rgb(const BColor& rHSVColor);
46 
47         /// Transform from R'G'B' to YIQ (NTSC color model - Y is used in monochrome mode)
48         BColor rgb2yiq(const BColor& rRGBColor);
49         /// Transform from YIQ to R'G'B' (NTSC color model - Y is used in monochrome mode)
50         BColor yiq2rgb(const BColor& rYIQColor);
51 
52         /// Transform from R'G'B' to Y'PbPr (the [0,1]x[-.5,.5]x[-.5,.5] equivalent of Y'CbCr (which is scaled into 8bit))
53         BColor rgb2ypbpr(const BColor& rRGBColor);
54         /// Transform from Y'PbPr (the [0,1]x[-.5,.5]x[-.5,.5] equivalent of Y'CbCr (which is scaled into 8bit)) into R'G'B'
55         BColor ypbpr2rgb(const BColor& rYPbPrColor);
56 
57         /// Transform from CIE XYZ into Rec. 709 RGB (D65 white point)
58         BColor ciexyz2rgb( const BColor& rXYZColor );
59         /// Transform from Rec. 709 RGB (D65 white point) into CIE XYZ
60         BColor rgb2ciexyz( const BColor& rRGBColor );
61 
62 	}
63 } // end of namespace basegfx
64 
65 #endif /* _BGFX_COLOR_BCOLORTOOLS_HXX */
66 
67 //////////////////////////////////////////////////////////////////////////////
68 // eof
69