From 94eb2cb314e2629a659245554106ffe5e48f4d62 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 27 Jul 2015 02:37:09 +0300 Subject: Add method for get text object width. --- src/text.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index ae53a5984..38709f83b 100644 --- a/src/text.h +++ b/src/text.h @@ -76,6 +76,14 @@ class Text notfinal virtual void draw(Graphics *const graphics, const int xOff, const int yOff) A_NONNULL(2); + int getWidth() A_WARN_UNUSED; + + int getX() A_WARN_UNUSED + { return mX; } + + int getY() A_WARN_UNUSED + { return mY; } + private: Font *mFont; /**< The font of the text */ TextChunk mTextChunk; -- cgit v1.2.3-60-g2f50