GRAPHICS: Mark actual dirty area as dirty in Font::drawString.
This commit is contained in:
parent
509a00109e
commit
71c649f8d9
1 changed files with 6 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue