mirror of
https://github.com/izzy2lost/vba10.git
synced 2026-03-26 18:15:30 -07:00
43 lines
744 B
C++
43 lines
744 B
C++
#ifndef RECTANGLE_H_
|
|
#define RECTANGLE_H_
|
|
|
|
#include "Point.h"
|
|
#include "Size.h"
|
|
|
|
namespace Engine
|
|
{
|
|
struct Rectangle
|
|
{
|
|
public:
|
|
//union
|
|
//{
|
|
// struct
|
|
// {
|
|
int X;
|
|
int Y;
|
|
unsigned int Width;
|
|
unsigned int Height;
|
|
//};
|
|
//struct
|
|
//{
|
|
Point TopLeft;
|
|
Size Size;
|
|
// };
|
|
//};
|
|
|
|
Rectangle();
|
|
Rectangle(int x, int y, unsigned int width, unsigned int height);
|
|
Rectangle(const Point &topleft, const Engine::Size &size);
|
|
|
|
~Rectangle() = default;
|
|
|
|
Point GetBottomRight(void) const;
|
|
void GetBottomRight(Point *p) const;
|
|
void SetBottomRight(Point p);
|
|
|
|
bool Contains(const Rectangle &other) const;
|
|
bool Intersects(const Rectangle &other) const;
|
|
};
|
|
}
|
|
|
|
#endif |