Tizen Native API
|
Dali::Rect< T > Struct Template Reference
Template class to create and operate on rectangles. More...
Public Member Functions | |
Rect () | |
Constructor. | |
Rect (T x, T y, T width, T height) | |
Constructor. | |
Rect (const Rect< T > &rhs) | |
Copy constructor. | |
Rect< T > & | operator= (const Rect< T > &rhs) |
Assignment operator. | |
void | Set (T newX, T newY, T newWidth, T newHeight) |
Assignment from individual values. | |
bool | IsEmpty () const |
Determines whether or not this Rectangle is empty. | |
T | Left () const |
Get the left of the rectangle. | |
T | Right () const |
Get the right of the rectangle. | |
T | Top () const |
Get the top of the rectangle. | |
T | Bottom () const |
Get the bottom of the rectangle. | |
T | Area () const |
Get the area of the rectangle. | |
bool | Intersects (const Rect< T > &other) const |
Determines whether or not this rectangle and the specified rectangle intersect. | |
bool | Contains (const Rect< T > &other) const |
Determines whether or not this Rectangle contains the specified rectangle. | |
template<> | |
bool | IsEmpty () const |
Detailed Description
template<typename T = float>
struct Dali::Rect< T >
Template class to create and operate on rectangles.
- Since :
- 2.4
Constructor & Destructor Documentation
template<typename T = float>
Dali::Rect< T >::Rect | ( | ) |
Constructor.
- Since :
- 2.4
template<typename T = float>
Dali::Rect< T >::Rect | ( | T | x, |
T | y, | ||
T | width, | ||
T | height | ||
) |
Constructor.
- Since :
- 2.4
- Parameters:
-
[in] x x coordinate (or left) [in] y y coordinate (or right) [in] width width (or bottom) [in] height height (or top)
template<typename T = float>
Dali::Rect< T >::Rect | ( | const Rect< T > & | rhs | ) |
Copy constructor.
- Since :
- 2.4
- Parameters:
-
[in] rhs The original object
Member Function Documentation
template<typename T = float>
T Dali::Rect< T >::Area | ( | ) | const |
Get the area of the rectangle.
- Since :
- 2.4
- Returns:
- The area of the rectangle
template<typename T = float>
T Dali::Rect< T >::Bottom | ( | ) | const |
Get the bottom of the rectangle.
- Since :
- 2.4
- Returns:
- The bottom of the rectangle
template<typename T = float>
bool Dali::Rect< T >::Contains | ( | const Rect< T > & | other | ) | const |
Determines whether or not this Rectangle contains the specified rectangle.
- Since :
- 2.4
- Parameters:
-
[in] other The other rectangle to test against this rectangle
- Returns:
- true if the specified rectangle is contained
template<typename T = float>
bool Dali::Rect< T >::Intersects | ( | const Rect< T > & | other | ) | const |
Determines whether or not this rectangle and the specified rectangle intersect.
- Since :
- 2.4
- Parameters:
-
[in] other The other rectangle to test against this rectangle
- Returns:
- true if the rectangles intersect
template<typename T = float>
bool Dali::Rect< T >::IsEmpty | ( | ) | const |
Determines whether or not this Rectangle is empty.
- Since :
- 2.4
- Returns:
- true if width or height are zero
template<>
bool Dali::Rect< float >::IsEmpty | ( | ) | const |
- Since :
- 2.4
- Returns:
- true if the rectangle has zero size.
template<typename T = float>
T Dali::Rect< T >::Left | ( | ) | const |
Get the left of the rectangle.
- Since :
- 2.4
- Returns:
- The left edge of the rectangle
template<typename T = float>
Rect<T>& Dali::Rect< T >::operator= | ( | const Rect< T > & | rhs | ) |
Assignment operator.
- Since :
- 2.4
- Parameters:
-
[in] rhs The original object
- Returns:
- reference to this
template<typename T = float>
T Dali::Rect< T >::Right | ( | ) | const |
Get the right of the rectangle.
- Since :
- 2.4
- Returns:
- The right edge of the rectangle
template<typename T = float>
void Dali::Rect< T >::Set | ( | T | newX, |
T | newY, | ||
T | newWidth, | ||
T | newHeight | ||
) |
Assignment from individual values.
- Since :
- 2.4
- Parameters:
-
[in] newX x coordinate [in] newY y coordinate [in] newWidth width [in] newHeight height
template<typename T = float>
T Dali::Rect< T >::Top | ( | ) | const |
Get the top of the rectangle.
- Since :
- 2.4
- Returns:
- The top of the rectangle