mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[kandinsky] Correct drawrect
Change-Id: I5dca3d0ac417692cf1dfc0a5fd4dc37ae6c9a440
This commit is contained in:
@@ -88,14 +88,14 @@ void KDContext::blendRectWithMask(KDRect rect, KDColor color, const uint8_t * ma
|
||||
|
||||
void KDContext::drawRect(KDRect rect, KDColor color) {
|
||||
KDPoint p1 = rect.origin();
|
||||
KDPoint p2 = KDPoint(rect.x(), rect.bottom());
|
||||
KDPoint p2 = KDPoint(rect.x(), rect.bottom()).translatedBy(KDPoint(1,0));
|
||||
for (int i = 0; i<rect.width(); i++) {
|
||||
setPixel(p1, color);
|
||||
setPixel(p2, color);
|
||||
p1 = p1.translatedBy(KDPoint(1,0));
|
||||
p2 = p2.translatedBy(KDPoint(1,0));
|
||||
}
|
||||
p1 = rect.origin();
|
||||
p1 = rect.origin().translatedBy(KDPoint(0,1));
|
||||
p2 = KDPoint(rect.right(), rect.y());
|
||||
for (int i = 0; i<rect.height(); i++) {
|
||||
setPixel(p1, color);
|
||||
|
||||
Reference in New Issue
Block a user