[Scummvm-cvs-logs] scummvm master -> 71c649f8d9296f51c88fbc54eca34b9dfb4d9cd1
lordhoto
lordhoto at gmail.com
Sun Mar 20 20:00:55 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
71c649f8d9 GRAPHICS: Mark actual dirty area as dirty in Font::drawString.
Commit: 71c649f8d9296f51c88fbc54eca34b9dfb4d9cd1
https://github.com/scummvm/scummvm/commit/71c649f8d9296f51c88fbc54eca34b9dfb4d9cd1
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-20T19:59:55+01:00
Commit Message:
GRAPHICS: Mark actual dirty area as dirty in Font::drawString.
Changed paths:
graphics/font.cpp
diff --git a/graphics/font.cpp b/graphics/font.cpp
index d709758..4214b3f 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -276,12 +276,16 @@ void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y,
void Font::drawString(ManagedSurface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
drawString(&dst->_innerSurface, str, x, y, w, color, align, deltax, useEllipsis);
- dst->addDirtyRect(Common::Rect(x, y, x + w, y + getFontHeight()));
+ if (w != 0) {
+ dst->addDirtyRect(getBoundingBox(str, x, y, w, align));
+ }
}
void Font::drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align) const {
drawString(&dst->_innerSurface, str, x, y, w, color, align);
- dst->addDirtyRect(Common::Rect(x, y, x + w, y + getFontHeight()));
+ if (w != 0) {
+ dst->addDirtyRect(getBoundingBox(str, x, y, w, align));
+ }
}
int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const {
More information about the Scummvm-git-logs
mailing list