2013-07-12 21:30:13 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Rect.h *
|
|
|
|
* *
|
|
|
|
* XFX System::Windows::Rect structure definition file *
|
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-06-02 14:32:43 +02:00
|
|
|
#ifndef _SYSTEM_WINDOWS_RECT_
|
|
|
|
#define _SYSTEM_WINDOWS_RECT_
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
namespace Windows
|
|
|
|
{
|
|
|
|
struct Point;
|
|
|
|
struct Size;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Describes the width, height, and point origin of a rectangle.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct Rect : IEquatable<Rect>, Object
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int getBottom() const;
|
|
|
|
static const Rect Empty;
|
|
|
|
int Height;
|
|
|
|
int getLeft() const;
|
|
|
|
int getRight() const;
|
|
|
|
int getTop() const;
|
|
|
|
int Width;
|
|
|
|
int X;
|
|
|
|
int Y;
|
|
|
|
|
|
|
|
Rect();
|
|
|
|
Rect(const int x, const int y, const int width, const int height);
|
|
|
|
Rect(const Point point1, const Point point2);
|
|
|
|
Rect(const Point location, const Size size);
|
|
|
|
Rect(const Rect &obj);
|
|
|
|
|
|
|
|
bool Contains(const Point point) const;
|
2013-05-31 15:58:00 +02:00
|
|
|
bool Equals(Object const * const obj) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
bool Equals(const Rect other) const;
|
|
|
|
int GetHashCode() const;
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
void Intersect(const Rect rect);
|
2013-07-11 20:00:07 +02:00
|
|
|
const String ToString() const;
|
2013-05-05 18:18:41 +02:00
|
|
|
void Union(const Point point);
|
|
|
|
void Union(const Rect rect);
|
2013-06-02 14:32:43 +02:00
|
|
|
|
|
|
|
bool operator!=(const Rect& right) const;
|
|
|
|
bool operator==(const Rect& right) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2013-06-02 14:32:43 +02:00
|
|
|
|
|
|
|
#endif //_SYSTEM_WINDOWS_RECT_
|