Separate a reusable Image class from Screen (#834)

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Dimo Markov
2024-04-27 12:03:44 +03:00
committed by GitHub
parent 1f6e1101e8
commit 293ff179f6
12 changed files with 243 additions and 107 deletions

View File

@@ -39,6 +39,12 @@ bool Box::Contain(int x, int y) const {
y_max >= y;
}
/// @return whether the box is empty.
/// @ingroup screen
bool Box::IsEmpty() {
return x_min > x_max || y_min > y_max;
}
/// @return whether |other| is the same as |this|
/// @ingroup screen
bool Box::operator==(const Box& other) const {