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 FGrpDimension.h
20 * @brief This is the header file for the %Dimension class.
22 * This header file contains the declarations of the %Dimension class.
25 #ifndef _FGRP_DIMENSION_H_
26 #define _FGRP_DIMENSION_H_
28 #include <FBaseObject.h>
30 namespace Tizen { namespace Graphics
34 * @brief This class represents the width and height of a two-dimensional region.
38 * @final This class is not intended for extension.
40 * The %Dimension class provides methods to abstract and set the width and height of a two-dimensional region.
42 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/shapes.htm">Shapes</a>.
45 class _OSP_EXPORT_ Dimension
46 : public Tizen::Base::Object
50 * This is the default constructor for this class. @n
51 * This constructor initializes an instance of %Dimension with the width and the height set as @c 0.
58 * This is the copy constructor for the %Dimension class.
62 * @param[in] rhs An instance of %Dimension
64 Dimension(const Dimension& rhs);
67 * Initializes an instance of %Dimension with the specified values of width and height.
71 * @param[in] width The width to set
72 * @param[in] height The height to set
74 Dimension(int width, int height);
77 * This is the destructor for this class.
81 virtual ~Dimension(void);
84 * Assigns the value of the specified instance to the current instance of %Dimension.
88 * @param[in] rhs An instance of %Dimension
90 Dimension& operator =(const Dimension& rhs);
93 * Checks whether the two instances of %Dimension have equal width and height values.
97 * @return @c true if the values of the width and height of the two instances of %Dimension are equal, @n
99 * @param[in] rhs An instance of %Dimension
101 bool operator ==(const Dimension& rhs) const;
104 * Checks whether the two instances of %Dimension have different width and height values.
108 * @return @c true if the values of the width and the height of the two instances of %Dimension are not equal, @n
110 * @param[in] rhs An instance of %Dimension
112 bool operator !=(const Dimension& rhs) const;
115 * Checks whether the value of the current instance of %Dimension equals the value of the specified instance.
119 * @return @c true if the value of the current instance equals the value of the specified instance, @n
121 * @param[in] rhs An instance of %Dimension
122 * @remarks The %Dimension class has a semantic value, which means that the
123 * Equals() method checks whether the two instances have the same width and height.
125 virtual bool Equals(const Tizen::Base::Object& rhs) const;
128 * Gets the hash value of the current instance.
132 * @return The hash value of the current instance
133 * @remarks Two equal instances must return the same hash value. For better performance,
134 * the used hash function must generate a random distribution for all inputs.
136 virtual int GetHashCode(void) const;
139 * Sets the size of the current instance of %Dimension.
143 * @param[in] width The new width
144 * @param[in] height The new height
146 void SetSize(int width, int height);
150 * The width of the current instance of %Dimension.
157 * The height of the current instance of %Dimension.
164 friend class _DimensionImpl;
167 // This variable is for internal use only.
168 // Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
172 class _DimensionImpl * __pImpl;
176 }} // Tizen::Graphics
178 #endif // _FGRP_DIMENSION_H_