summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/text.h
diff options
context:
space:
mode:
authoradiblol <adiblol@chommik.eu>2012-09-27 23:55:13 +0200
committeradiblol <adiblol@chommik.eu>2012-09-27 23:55:13 +0200
commit77952a85e63ca13dd9cfc93c7b6a271d7c91e59a (patch)
treeacec920fff5f86b2776bab9e1e4ea9921115ecaa /src/graphics/engine/text.h
parent6d0ed0d26aebead7c79e4fb97c6962e06e7dcb41 (diff)
parent9f4c1454dc75d697b43a634927ebcfd6186a4e93 (diff)
downloadcolobot-77952a85e63ca13dd9cfc93c7b6a271d7c91e59a.tar.gz
colobot-77952a85e63ca13dd9cfc93c7b6a271d7c91e59a.tar.bz2
colobot-77952a85e63ca13dd9cfc93c7b6a271d7c91e59a.zip
Merge remote-tracking branch 'origin/dev' into dev-graphics
Diffstat (limited to 'src/graphics/engine/text.h')
-rw-r--r--src/graphics/engine/text.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h
index bb9a32d..cc18f55 100644
--- a/src/graphics/engine/text.h
+++ b/src/graphics/engine/text.h
@@ -239,7 +239,7 @@ public:
void FlushCache();
//! Draws text (multi-format)
- void DrawText(const std::string &text, const std::vector<FontMetaChar> &format,
+ void DrawText(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
float size, Math::Point pos, float width, TextAlign align,
int eol);
//! Draws text (one font)
@@ -248,7 +248,7 @@ public:
int eol);
//! Calculates dimensions for text (multi-format)
- void SizeText(const std::string &text, const std::vector<FontMetaChar> &format,
+ void SizeText(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
float size, Math::Point pos, TextAlign align,
Math::Point &start, Math::Point &end);
//! Calculates dimensions for text (one font)
@@ -265,20 +265,20 @@ public:
//! Returns width of string (multi-format)
float GetStringWidth(const std::string &text,
- const std::vector<FontMetaChar> &format, float size);
+ std::map<unsigned int, FontMetaChar> &format, float size);
//! Returns width of string (single font)
float GetStringWidth(const std::string &text, FontType font, float size);
//! Returns width of single character
float GetCharWidth(UTF8Char ch, FontType font, float size, float offset);
//! Justifies a line of text (multi-format)
- int Justify(const std::string &text, const std::vector<FontMetaChar> &format,
+ int Justify(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
float size, float width);
//! Justifies a line of text (one font)
int Justify(const std::string &text, FontType font, float size, float width);
//! Returns the most suitable position to a given offset (multi-format)
- int Detect(const std::string &text, const std::vector<FontMetaChar> &format,
+ int Detect(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
float size, float offset);
//! Returns the most suitable position to a given offset (one font)
int Detect(const std::string &text, FontType font, float size, float offset);
@@ -287,7 +287,7 @@ protected:
CachedFont* GetOrOpenFont(FontType type, float size);
CharTexture CreateCharTexture(UTF8Char ch, CachedFont* font);
- void DrawString(const std::string &text, const std::vector<FontMetaChar> &format,
+ void DrawString(const std::string &text, std::map<unsigned int, FontMetaChar> &format,
float size, Math::Point pos, float width, int eol);
void DrawString(const std::string &text, FontType font,
float size, Math::Point pos, float width, int eol);