15 eRect(): x1(0), y1(0), x2(-1), y2(-1) {}
20 x1(topleft.
x()), y1(topleft.
y()), x2(bottomright.
x()), y2(bottomright.
y())
23 x1(topleft.
x()), y1(topleft.
y()),
67 void rect(
int *
x,
int *
y,
int *w,
int *h )
const;
68 void coords(
int *x1,
int *y1,
int *x2,
int *y2 )
const;
92 void setRect(
int x,
int y,
int w,
int h );
93 void setCoords(
int x1,
int y1,
int x2,
int y2 );
121 void scale(
int x_n,
int x_d,
int y_n,
int y_d);
139 {
return x1 >= x2 || y1 >= y2; }
142 {
return x1 <= x2 && y1 <= y2; }
193 {
return ePoint(x1, y1); }
196 {
return ePoint(x2, y2); }
199 {
return ePoint(x2, y1); }
202 {
return ePoint(x1, y2); }
205 {
return ePoint(x1, y1); }
208 {
return ePoint(x2-1, y2-1); }
211 {
return ePoint(x2-1, y1); }
214 {
return ePoint(x1, y2-1); }
217 {
return ePoint((x1+x2)/2, (y1+y2)/2); }
226 {
return eSize(x2-x1, y2-y1); }
230 return (
x >= x1) && (
x < x2) && (
y >= y1) && (
y < y2);
int y() const
Definition: epoint.h:86
int x() const
Definition: epoint.h:83
eRect(const ePoint &topleft, const eSize &size)
Definition: erect.h:22
int width() const
Definition: erect.h:219
ePoint bottomLeft1() const
Definition: erect.h:213
bool contains(const ePoint &p) const
Definition: erect.cpp:118
eRect(const ePoint &topleft, const ePoint &bottomright)
Definition: erect.h:19
eRect normalize() const
Definition: erect.cpp:8
eRect intersect(const eRect &r) const
Definition: erect.cpp:177
ePoint topLeft() const
Definition: erect.h:192
void moveBottomRight(const ePoint &p)
Definition: erect.cpp:52
void moveBy(int dx, int dy)
Definition: erect.h:76
eSize size() const
Definition: erect.h:225
eRect unite(const eRect &r) const
Definition: erect.cpp:162
void moveTopRight(const ePoint &p)
Definition: erect.cpp:60
void setBottom(int pos)
Definition: erect.h:183
int & rBottom()
Definition: erect.h:165
void moveTopLeft(const ePoint &p)
Definition: erect.cpp:44
int left() const
Definition: erect.h:144
static eRect invalidRect()
Definition: erect.h:119
int surface() const
Definition: erect.h:98
int bottom() const
Definition: erect.h:153
ePoint topRight1() const
Definition: erect.h:210
int & rLeft()
Definition: erect.h:156
int height() const
Definition: erect.h:222
bool valid() const
Definition: erect.h:141
eRect()
Definition: erect.h:15
void scale(int x_n, int x_d, int y_n, int y_d)
Definition: erect.cpp:198
int & rTop()
Definition: erect.h:159
int & rRight()
Definition: erect.h:162
eRect(int left, int top, int width, int height)
Definition: erect.h:16
void setRect(int x, int y, int w, int h)
Definition: erect.cpp:86
void moveBy(ePoint r)
Definition: erect.h:84
static eRect emptyRect()
Definition: erect.h:118
int y() const
Definition: erect.h:171
ePoint bottomLeft() const
Definition: erect.h:201
int top() const
Definition: erect.h:147
void setY(int y)
Definition: erect.h:189
void moveCenter(const ePoint &p)
Definition: erect.cpp:76
void rect(int *x, int *y, int *w, int *h) const
Definition: erect.cpp:28
void setSize(const eSize &s)
Definition: erect.cpp:112
bool empty() const
Definition: erect.h:138
eRect & operator&=(const eRect &r)
Definition: erect.cpp:138
void setX(int x)
Definition: erect.h:186
friend bool operator!=(const eRect &, const eRect &)
Definition: erect.cpp:193
int x() const
Definition: erect.h:168
void setLeft(int pos)
Definition: erect.h:174
ePoint center() const
Definition: erect.h:216
ePoint topRight() const
Definition: erect.h:198
friend bool operator==(const eRect &, const eRect &)
Definition: erect.cpp:188
void setCoords(int x1, int y1, int x2, int y2)
Definition: erect.cpp:94
eRect operator|(const eRect &r) const
Definition: erect.cpp:144
void moveBottomLeft(const ePoint &p)
Definition: erect.cpp:68
eRect & operator|=(const eRect &r)
Definition: erect.cpp:132
void setRight(int pos)
Definition: erect.h:180
void setTop(int pos)
Definition: erect.h:177
int right() const
Definition: erect.h:150
bool intersects(const eRect &r) const
Definition: erect.cpp:182
void setHeight(int h)
Definition: erect.cpp:107
void setWidth(int w)
Definition: erect.cpp:102
ePoint bottomRight() const
Definition: erect.h:195
eRect operator&(const eRect &r) const
Definition: erect.cpp:167
ePoint topLeft1() const
Definition: erect.h:204
ePoint bottomRight1() const
Definition: erect.h:207
void coords(int *x1, int *y1, int *x2, int *y2) const
Definition: erect.cpp:36
bool operator!=(const eRect &, const eRect &)
Definition: erect.cpp:193
bool operator==(const eRect &, const eRect &)
Definition: erect.cpp:188
pos
Definition: enigma_py_patcher.py:16
p
Definition: upgrade.py:63
std::string int int y
Definition: picload.cpp:1503
std::string int x
Definition: picload.cpp:1503