Skip to content

Commit 0ab39f1

Browse files
committed
Use drawVerticalLine in fillRect
1 parent a2bc976 commit 0ab39f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OLEDDisplay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ void OLEDDisplay::drawRect(int16_t x, int16_t y, int16_t width, int16_t height)
130130
}
131131

132132
void OLEDDisplay::fillRect(int16_t xMove, int16_t yMove, int16_t width, int16_t height) {
133-
for (int16_t i = yMove; i < yMove + height; i++) {
134-
drawHorizontalLine(xMove, i, width);
133+
for (int16_t x = xMove; x < xMove + width; x++) {
134+
drawVerticalLine(x, yMove, height);
135135
}
136136
}
137137

0 commit comments

Comments
 (0)