GRAPHICS: Mark actual dirty area as dirty in Font::drawString.

This commit is contained in:
Johannes Schickel 2016-03-20 19:57:42 +01:00
parent 509a00109e
commit 71c649f8d9

View file

@ -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 {