|
@@ -299,9 +299,15 @@ struct Rect { |
|
|
bool isEqual(Rect r) const { |
|
|
bool isEqual(Rect r) const { |
|
|
return pos.isEqual(r.pos) && size.isEqual(r.size); |
|
|
return pos.isEqual(r.pos) && size.isEqual(r.size); |
|
|
} |
|
|
} |
|
|
|
|
|
float getLeft() const { |
|
|
|
|
|
return pos.x; |
|
|
|
|
|
} |
|
|
float getRight() const { |
|
|
float getRight() const { |
|
|
return pos.x + size.x; |
|
|
return pos.x + size.x; |
|
|
} |
|
|
} |
|
|
|
|
|
float getTop() const { |
|
|
|
|
|
return pos.y; |
|
|
|
|
|
} |
|
|
float getBottom() const { |
|
|
float getBottom() const { |
|
|
return pos.y + size.y; |
|
|
return pos.y + size.y; |
|
|
} |
|
|
} |
|
|