2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
20 * @brief Header file of _Colorf class
22 * This file contains declarations _Colorf class.
25 #ifndef _FUI_INTERNAL_COLORF_H_
26 #define _FUI_INTERNAL_COLORF_H_
28 #include <FBaseErrors.h>
30 namespace Tizen { namespace Ui
36 _Colorf(void) { __r = __g = __b = 0.0f;__a = 1.0f;}
37 _Colorf(float red, float green, float blue, float alpha)
44 _Colorf(const _Colorf& color)
52 virtual ~_Colorf(void) {}
54 _Colorf& operator =(const _Colorf& color)
67 bool operator !=(const _Colorf& color) const
69 return (__r != color.__r) || (__g != color.__g) || (__b != color.__b) || (__a != color.__a);
72 bool operator ==(const _Colorf& color) const
74 // CHECKME: need float compare ???
75 return (__r == color.__r) && (__g == color.__g) && (__b == color.__b) && (__a == color.__a);
78 result SetRGBAColor(float r, float g, float b, float a)
87 float& Red(void) { return __r;}
88 float& Green(void) { return __g;}
89 float& Blue(void) { return __b;}
90 float& Alpha(void) { return __a;}
92 float Red(void) const { return __r;}
93 float Green(void) const { return __g;}
94 float Blue(void) const { return __b;}
95 float Alpha(void) const { return __a;}