summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-27 02:37:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-27 14:00:01 +0300
commit94eb2cb314e2629a659245554106ffe5e48f4d62 (patch)
tree83f5b6212270cb53af0d7fbd372bb7d1489c4bc9 /src/text.cpp
parent6c80045c4da5094014d623e3b855e31bfa8bf301 (diff)
downloadplus-94eb2cb314e2629a659245554106ffe5e48f4d62.tar.gz
plus-94eb2cb314e2629a659245554106ffe5e48f4d62.tar.bz2
plus-94eb2cb314e2629a659245554106ffe5e48f4d62.tar.xz
plus-94eb2cb314e2629a659245554106ffe5e48f4d62.zip
Add method for get text object width.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/text.cpp b/src/text.cpp
index c4540dd4c..7dbaa7a20 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -178,6 +178,11 @@ void Text::draw(Graphics *const graphics, const int xOff, const int yOff)
BLOCK_END("Text::draw")
}
+int Text::getWidth()
+{
+ return mTextChunk.img->getWidth();
+}
+
FlashText::FlashText(const std::string &text,
const int x, const int y,
const Graphics::Alignment alignment,