Skip to content

Commit 6dd5d44

Browse files
Merge pull request #52 from per1234/incomplete-scroll
Correct scroll length for left and up directions
2 parents b9ed5e3 + e0415f1 commit 6dd5d44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ArduinoGraphics.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ void ArduinoGraphics::endText(int scrollDirection)
452452
stroke(_textR, _textG, _textB);
453453

454454
if (scrollDirection == SCROLL_LEFT) {
455-
int scrollLength = _textBuffer.length() * textFontWidth() + _textX;
455+
int scrollLength = _textBuffer.length() * textFontWidth() + _textX + 1;
456456

457457
for (int i = 0; i < scrollLength; i++) {
458458
beginDraw();
@@ -476,7 +476,7 @@ void ArduinoGraphics::endText(int scrollDirection)
476476
delay(_textScrollSpeed);
477477
}
478478
} else if (scrollDirection == SCROLL_UP) {
479-
int scrollLength = textFontHeight() + _textY;
479+
int scrollLength = textFontHeight() + _textY + 1;
480480

481481
for (int i = 0; i < scrollLength; i++) {
482482
beginDraw();

0 commit comments

Comments
 (0)