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 _Pointf class
22 * This file contains declarations _Pointf class.
25 #ifndef _FUI_ANIM_INTERNAL_POINTF_H_
26 #define _FUI_ANIM_INTERNAL_POINTF_H_
28 #include <FGrpPoint.h>
30 namespace Tizen { namespace Ui { namespace Animations
41 _Pointf(float _x, float _y)
47 _Pointf(const _Pointf& point) { *this = point;}
48 _Pointf(const Tizen::Graphics::Point& point) { x = point.x; y = point.y;}
50 bool operator ==(const _Pointf& point) const
52 return (x == point.x && y == point.y);
55 bool operator !=(const _Pointf& point) const
57 return !(x == point.x && y == point.y);
60 _Pointf& operator =(const _Pointf& point)
62 if (likely(&point != this))
71 _Pointf operator -(const _Pointf& point) const
73 return _Pointf(x - point.x, y - point.y);
76 _Pointf operator +(const _Pointf& point) const
78 return _Pointf(x + point.x, y + point.y);
81 void OffsetPoint(float xDelta, float yDelta)
87 void SetPoint(float xPoint, float yPoint)
93 float X(void) const { return x;}
94 float Y(void) const { return y;}
95 float& X(void) { return x;}
96 float& Y(void) { return y;}
103 }}} // Tizen::Ui::Animations
105 #endif // _FUI_ANIM_INTERNAL_POINTF_H_