aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/mactext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/macgui/mactext.cpp')
-rw-r--r--graphics/macgui/mactext.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 4807e19dbb..fde79f910e 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -94,4 +94,15 @@ void MacText::render() {
}
}
+void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff) {
+ render();
+
+ if (x + w < _surface.w || y + h < _surface.h) {
+ g->fillRect(Common::Rect(x, y, x + w, y + w), _bgcolor);
+ }
+
+ g->blitFrom(_surface, Common::Rect(MIN<int>(_surface.w, x), MIN<int>(_surface.h, y),
+ MIN<int>(_surface.w, x + w), MIN<int>(_surface.w, y + w)), Common::Point(xoff, yoff));
+}
+
} // End of namespace Graphics