aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMax Horn2008-11-12 14:30:16 +0000
committerMax Horn2008-11-12 14:30:16 +0000
commitc0f82d351894df16e23690b4361e66bed0fb6f84 (patch)
treef6ddb6d08e8dbe0637a5e5dcfb13d4a4fa5c21c0 /graphics
parent144be21bed1001c4a72739ef7656908cbf71e909 (diff)
downloadscummvm-rg350-c0f82d351894df16e23690b4361e66bed0fb6f84.tar.gz
scummvm-rg350-c0f82d351894df16e23690b4361e66bed0fb6f84.tar.bz2
scummvm-rg350-c0f82d351894df16e23690b4361e66bed0fb6f84.zip
Renamed Graphics::TextAlignment -> Graphics::TextAlign and merged it with GUI::ThemeEngine::TextAlignVertical
svn-id: r35023
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.h2
-rw-r--r--graphics/VectorRendererSpec.cpp4
-rw-r--r--graphics/VectorRendererSpec.h2
-rw-r--r--graphics/font.cpp2
-rw-r--r--graphics/font.h12
5 files changed, 11 insertions, 11 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 4ccd6845b9..f0c319fe76 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -507,7 +507,7 @@ public:
* method.
*/
virtual void drawString(const Graphics::Font *font, const Common::String &text,
- const Common::Rect &area, GUI::ThemeEngine::TextAlign alignH,
+ const Common::Rect &area, Graphics::TextAlign alignH,
GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis) = 0;
/**
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 675acd7ad3..2924e2b1b7 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -449,7 +449,7 @@ colorFill(PixelType *first, PixelType *last, PixelType color) {
template <typename PixelType, typename PixelFormat>
void VectorRendererSpec<PixelType, PixelFormat>::
drawString(const Graphics::Font *font, const Common::String &text, const Common::Rect &area,
- GUI::ThemeEngine::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis) {
+ Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis) {
int offset = area.top;
@@ -466,7 +466,7 @@ drawString(const Graphics::Font *font, const Common::String &text, const Common:
}
}
- font->drawString(_activeSurface, text, area.left, offset, area.width(), _fgColor, (Graphics::TextAlignment)alignH, deltax, ellipsis);
+ font->drawString(_activeSurface, text, area.left, offset, area.width(), _fgColor, alignH, deltax, ellipsis);
}
/** LINES **/
diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h
index 5b4ebf38e7..fdeb9f9989 100644
--- a/graphics/VectorRendererSpec.h
+++ b/graphics/VectorRendererSpec.h
@@ -68,7 +68,7 @@ public:
drawBevelSquareAlg(x, y, w, h, bevel, _bevelColor, _fgColor, Base::_fillMode != kFillDisabled);
}
void drawString(const Graphics::Font *font, const Common::String &text,
- const Common::Rect &area, GUI::ThemeEngine::TextAlign alignH,
+ const Common::Rect &area, Graphics::TextAlign alignH,
GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool elipsis);
void setFgColor(uint8 r, uint8 g, uint8 b) { _fgColor = RGBToColor<PixelFormat>(r, g, b); }
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 3680ad2eb8..bc5353c9c6 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -772,7 +772,7 @@ int Font::getStringWidth(const Common::String &str) const {
return space;
}
-void Font::drawString(Surface *dst, const Common::String &s, int x, int y, int w, uint32 color, TextAlignment align, int deltax, bool useEllipsis) const {
+void Font::drawString(Surface *dst, const Common::String &s, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
assert(dst != 0);
const int leftX = x, rightX = x + w;
uint i;
diff --git a/graphics/font.h b/graphics/font.h
index 3911e6d32c..5667fcd8f3 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -34,11 +34,11 @@ class SeekableReadStream;
namespace Graphics {
-// Text alignment modes for drawString()
-enum TextAlignment {
- kTextAlignLeft,
- kTextAlignCenter,
- kTextAlignRight
+/** Text alignment modes */
+enum TextAlign {
+ kTextAlignLeft, //!< Text should be aligned to the left
+ kTextAlignCenter, //!< Text should be centered
+ kTextAlignRight //!< Text should be aligned to the right
};
/**
@@ -57,7 +57,7 @@ public:
virtual int getCharWidth(byte chr) const = 0;
virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const = 0;
- void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlignment align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
+ void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
/**
* Compute and return the width the string str has when rendered using this font.