aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-20 14:55:41 -0400
committerPaul Gilbert2016-03-20 14:55:41 -0400
commit3c852cc240221785598023de56e5a71a0d8806fa (patch)
treec2a64b811586e4e9d8a4d5baa04d5c4f9d23bd08 /graphics/font.cpp
parentea54e6244e75c609e6886ba210f80fb22c479d3f (diff)
parent509a00109e79156e91c062f145ac3aa86ec8584e (diff)
downloadscummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.tar.gz
scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.tar.bz2
scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.zip
Merge branch 'master' into titanic
Diffstat (limited to 'graphics/font.cpp')
-rw-r--r--graphics/font.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp
index dba48249bc..d709758948 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -21,6 +21,7 @@
*/
#include "graphics/font.h"
+#include "graphics/managed_surface.h"
#include "common/array.h"
#include "common/util.h"
@@ -273,6 +274,16 @@ void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y,
drawStringImpl(*this, dst, str, x, y, w, color, align, 0);
}
+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()));
+}
+
+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()));
+}
+
int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const {
return wordWrapTextImpl(*this, str, maxWidth, lines);
}