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.
19 * @file FGrpCoordinateSystem.h
20 * @brief This is the header file for the %CoordinateSystem class.
22 * This header file contains the declarations of the %CoordinateSystem class.
25 #ifndef _FGRP_COORDINATE_SYSTEM_H_
26 #define _FGRP_COORDINATE_SYSTEM_H_
29 #include <FGrpDimension.h>
30 #include <FGrpFloatPoint.h>
31 #include <FGrpFloatDimension.h>
32 #include <FGrpFloatRectangle.h>
35 namespace Tizen { namespace Graphics
39 * @class CoordinateSystem
40 * @brief This class provides various utility methods for coordinate handling.
44 * The %CoordinateSystem class provides various utility methods for coordinate handling.
47 class _OSP_EXPORT_ CoordinateSystem
51 * Returns the screen resolution in logical coordinates.
55 * @return The screen resolution in logical coordinates
57 static Dimension GetLogicalResolution(void);
60 * Returns the screen resolution in physical coordinates.
64 * @return The screen resolution in physical coordinates
66 static Dimension GetPhysicalResolution(void);
69 * Converts the physical value along x-axis to the logical one.
73 * @return The converted logical value for the physical one
74 * @param[in] physicalX An input physical value to convert
76 static int ConvertToLogicalX(int physicalX);
79 * Converts the physical value along x-axis to the logical one.
83 * @return The converted logical value for the physical one
84 * @param[in] physicalX An input physical value to convert
86 static float ConvertToLogicalX(float physicalX);
89 * Converts the physical value along y-axis to the logical one.
93 * @return The converted logical value for the physical one
94 * @param[in] physicalY An input physical value to convert
96 static int ConvertToLogicalY(int physicalY);
99 * Converts the physical value along y-axis to the logical one.
103 * @return The converted logical value for the physical one
104 * @param[in] physicalY An input physical value to convert
106 static float ConvertToLogicalY(float physicalY);
109 * Converts the logical value along x-axis to the physical one.
113 * @return The converted physical X value
114 * @param[in] logicalX An input logical value to convert
116 static int ConvertToPhysicalX(int logicalX);
119 * Converts the logical value along x-axis to the physical one.
123 * @return The converted physical X value
124 * @param[in] logicalX An input logical value to convert
126 static float ConvertToPhysicalX(float logicalX);
129 * Converts the logical value along y-axis to the physical one.
133 * @return The converted physical Y value
134 * @param[in] logicalY An input logical value to convert
136 static int ConvertToPhysicalY(int logicalY);
139 * Converts the logical value along y-axis to the physical one.
143 * @return The converted physical Y value
144 * @param[in] logicalY An input logical value to convert
146 static float ConvertToPhysicalY(float logicalY);
149 * Returns the FloatPoint which will be pixel-exact in the device coordinate system, for best appearance on the display.
153 * @return Device aligned point
154 * @param[in] point input point to be aligned.
156 static FloatPoint AlignToDevice(const FloatPoint& point);
159 * Returns the FloatDimension which will be pixel-exact in the device coordinate system, for best appearance on the display.
163 * @return Device aligned dimension
164 * @param[in] dimension input dimension to be aligned.
166 static FloatDimension AlignToDevice(const FloatDimension& dimension);
169 * Returns the FloatRectangle which will be pixel-exact in the device coordinate system, for best appearance on the display.
173 * @return Device aligned rectangle
174 * @param[in] rectangle input rectangle to be aligned.
176 static FloatRectangle AlignToDevice(const FloatRectangle& rectangle);
180 // This default constructor is intentionally declared as private because this class cannot be constructed.
182 CoordinateSystem(void);
185 // This destructor is intentionally declared as private because this class cannot be constructed.
187 ~CoordinateSystem(void);
189 }; // CoordinateSystem
191 }} // Tizen::Graphics
193 #endif // _FGRP_COORDINATE_SYSTEM_H_