aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/VectorRenderer.cpp')
-rw-r--r--graphics/VectorRenderer.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index f679d2fe67..daeeb43f69 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -71,6 +71,14 @@ void VectorRenderer::drawStep(const Common::Rect &area, const DrawStep &step) {
(this->*(step.drawingCall))(area, step);
}
+void VectorRenderer::textStep(const Common::String &text, const Common::Rect &area, const TextStep &step) {
+ if (step.color.set)
+ setFgColor(step.color.r, step.color.g, step.color.b);
+
+ assert(step.font);
+ drawString(step.font, text.c_str(), area, step.align);
+}
+
/********************************************************************
* MISCELANEOUS functions
********************************************************************/
@@ -176,6 +184,12 @@ inline uint32 fp_sqroot(uint32 x) {
/********************************************************************
* Primitive shapes drawing - Public API calls - VectorRendererSpec
********************************************************************/
+template <typename PixelType, typename PixelFormat>
+void VectorRendererSpec<PixelType, PixelFormat>::
+drawString(Graphics::Font *font, const Common::String &text, const Common::Rect &area, GUI::Theme::TextAlign align) {
+ font->drawString(_activeSurface, text, area.left, area.top, area.width(), _fgColor, (Graphics::TextAlignment)align, 0, false);
+}
+
/** LINES **/
template<typename PixelType, typename PixelFormat>
void VectorRendererSpec<PixelType, PixelFormat>::