mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[kandinsky] Fix draw rect+change name: drawRect->strokeRect
Change-Id: I1c59e34b126aa54819e399d095499758b9e73125
This commit is contained in:
committed by
EmilieNumworks
parent
080450a358
commit
c545a23ec6
@@ -25,7 +25,7 @@ public:
|
||||
void fillRect(KDRect rect, KDColor color);
|
||||
void fillRectWithPixels(KDRect rect, const KDColor * pixels, KDColor * workingBuffer);
|
||||
void blendRectWithMask(KDRect rect, KDColor color, const uint8_t * mask, KDColor * workingBuffer);
|
||||
void drawRect(KDRect rect, KDColor color);
|
||||
void strokeRect(KDRect rect, KDColor color);
|
||||
protected:
|
||||
KDContext(KDPoint origin, KDRect clippingRect);
|
||||
virtual void pushRect(KDRect, const KDColor * pixels) = 0;
|
||||
|
||||
@@ -86,16 +86,16 @@ void KDContext::blendRectWithMask(KDRect rect, KDColor color, const uint8_t * ma
|
||||
pushRect(absoluteRect, workingBuffer);
|
||||
}
|
||||
|
||||
void KDContext::drawRect(KDRect rect, KDColor color) {
|
||||
void KDContext::strokeRect(KDRect rect, KDColor color) {
|
||||
KDPoint p1 = rect.origin();
|
||||
KDPoint p2 = KDPoint(rect.x(), rect.bottom()).translatedBy(KDPoint(1,0));
|
||||
KDPoint p2 = KDPoint(rect.x(), rect.bottom());
|
||||
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().translatedBy(KDPoint(0,1));
|
||||
p1 = rect.origin();
|
||||
p2 = KDPoint(rect.right(), rect.y());
|
||||
for (int i = 0; i<rect.height(); i++) {
|
||||
setPixel(p1, color);
|
||||
|
||||
Reference in New Issue
Block a user