diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-06-03 01:35:35 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-06-03 01:35:35 +0200 |
commit | 018acd52c0b98027233a6c201222b66996528bb0 (patch) | |
tree | 6e821155e7fa13407f0541539c5385060aebdd28 | |
parent | 2dd042939f3774a1fc473aceaf25b128ca27f740 (diff) | |
download | graphlcd-base-018acd52c0b98027233a6c201222b66996528bb0.tar.gz graphlcd-base-018acd52c0b98027233a6c201222b66996528bb0.tar.bz2 |
scrolling should be smooth again
-rw-r--r-- | glcdgraphics/bitmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glcdgraphics/bitmap.c b/glcdgraphics/bitmap.c index a1ca735..9080ec4 100644 --- a/glcdgraphics/bitmap.c +++ b/glcdgraphics/bitmap.c @@ -595,10 +595,10 @@ int cBitmap::DrawText(int x, int y, int xmax, const std::string & text, const cF if (skipPixels >= font->Width(text)) start = text.length(); else - { + { unsigned int tmp = start; cFont::EncodedCharAdjustCounter(font->IsUTF8(), text, c, tmp); - while (skipPixels > font->Width(c /*text[start]*/)) + while (skipPixels > font->SpaceBetween() + font->Width(text.substr(start), 1 /*text[start]*/)) { cFont::EncodedCharAdjustCounter(font->IsUTF8(), text, c, start); skipPixels -= font->Width(c/*text[start]*/); |