_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
55 #ifndef GCN_IMAGEFONT_HPP
56 #define GCN_IMAGEFONT_HPP
106 ImageFont(
const std::string& filename,
const std::string& glyphs);
122 ImageFont(
const std::string& filename,
unsigned char glyphsFrom=32,
unsigned char glyphsTo=126);
143 virtual int drawGlyph(
Graphics* graphics,
unsigned char glyph,
int x,
int y);
151 virtual void setRowSpacing(
int spacing);
158 virtual int getRowSpacing();
166 virtual void setGlyphSpacing(
int spacing);
173 virtual int getGlyphSpacing();
181 virtual int getWidth(
unsigned char glyph)
const;
186 virtual int getWidth(
const std::string& text)
const;
188 virtual void drawString(
Graphics* graphics,
const std::string& text,
int x,
int y,
bool is_normal =
true);
190 virtual int getHeight()
const;
192 virtual int getStringIndexAt(
const std::string& text,
int x);
195 void addGlyph(
unsigned char c,
int &x,
int &y,
const Color& separator);
206 #endif // end GCN_IMAGEFONT_HPP
Definition: graphics.h:97
std::string mFilename
Definition: imagefont.h:202
Image * mImage
Definition: imagefont.h:201
Definition: cliprectangle.cpp:61
Definition: rectangle.h:65
int mGlyphSpacing
Definition: imagefont.h:199
int mRowSpacing
Definition: imagefont.h:200
Definition: imagefont.h:92
int mHeight
Definition: imagefont.h:198
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.