From b5086559b816f68506d33362566377443a1ff1d8 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 23 Jul 2008 16:38:39 +0000 Subject: Font rendering overhaul. Work in progress. svn-id: r33247 --- graphics/VectorRenderer.cpp | 9 --------- graphics/VectorRenderer.h | 21 --------------------- 2 files changed, 30 deletions(-) (limited to 'graphics') diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp index 639039fe28..adcd299811 100644 --- a/graphics/VectorRenderer.cpp +++ b/graphics/VectorRenderer.cpp @@ -75,15 +75,6 @@ void VectorRenderer::drawStep(const Common::Rect &area, const DrawStep &step, ui (this->*(step.drawingCall))(area, step); } -void VectorRenderer::textStep(const Common::String &text, const Common::Rect &area, const TextStep &step, GUI::Theme::TextAlign alignH) { - if (step.color.set) - setFgColor(step.color.r, step.color.g, step.color.b); - - drawString(step.font, text.c_str(), area, - !step.hasAlign ? alignH : step.alignHorizontal, - !step.hasAlign ? GUI::Theme::kTextAlignVTop : step.alignVertical); -} - int VectorRenderer::stepGetRadius(const DrawStep &step, const Common::Rect &area) { int radius = 0; diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index a5e80164be..8a020ebfad 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -39,20 +39,6 @@ namespace Graphics { class VectorRenderer; struct DrawStep; -struct TextStep { - struct { - uint8 r, g, b; - bool set; - } - color; /** text color */ - - GUI::Theme::TextAlign alignHorizontal; - GUI::Theme::TextAlignVertical alignVertical; - bool hasAlign; - char *text; - const Graphics::Font *font; -}; - struct DrawStep { struct { uint8 r, g, b; @@ -404,7 +390,6 @@ public: * @param step Pointer to a DrawStep struct. */ virtual void drawStep(const Common::Rect &area, const DrawStep &step, uint32 extra = 0); - virtual void textStep(const Common::String &text, const Common::Rect &area, const TextStep &step, GUI::Theme::TextAlign alignH = GUI::Theme::kTextAlignLeft); /** * Copies the current surface to the system overlay @@ -422,8 +407,6 @@ public: */ virtual void blitSurface(Graphics::Surface *source, const Common::Rect &r) = 0; - virtual uint32 buildColor(uint8 r, uint8 g, uint8 b) = 0; - virtual void drawString(const Graphics::Font *font, const Common::String &text, const Common::Rect &area, GUI::Theme::TextAlign alignH, GUI::Theme::TextAlignVertical alignV) = 0; virtual void disableShadows() { _disableShadows = true; } @@ -595,10 +578,6 @@ public: src_ptr += src_pitch; } } - - virtual uint32 buildColor(uint8 r, uint8 g, uint8 b) { - return RGBToColor(r, g, b); - } protected: -- cgit v1.2.3