mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 13:50:28 +01:00
[kandinsky] In KDContext::getPixels: beware of rects crossing the screen
This fixes a display glitch on the device, when using Python's turtle module and doing the command forward(200).
This commit is contained in:
@@ -146,6 +146,16 @@ bool KDRect::contains(KDPoint p) const {
|
||||
return (p.x() >= x() && p.x() <= right() && p.y() >= y() && p.y() <= bottom());
|
||||
}
|
||||
|
||||
bool KDRect::containsRect(const KDRect & other) const {
|
||||
if (other.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return contains(other.topLeft()) && contains(other.bottomRight());
|
||||
}
|
||||
|
||||
bool KDRect::isAbove(KDPoint p) const {
|
||||
return (p.y() >= y());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user