#include <SDOM_BitmapFont.hpp>
|
virtual | ~BitmapFont () override |
|
virtual bool | onInit () override |
|
virtual void | onQuit () override |
|
virtual void | onLoad () override |
|
virtual void | onUnload () override |
|
virtual void | create (const sol::table &config) override |
|
virtual void | drawGlyph (Uint32 ch, int x, int y, const FontStyle &style) override |
|
virtual void | drawPhrase (const std::string &str, int x, int y, const FontStyle &style) override |
|
virtual void | drawPhraseOutline (const std::string &str, int x, int y, const FontStyle &style) override |
|
virtual void | drawPhraseDropshadow (const std::string &str, int x, int y, const FontStyle &style) override |
|
virtual bool | getGlyphMetrics (Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance) const override |
|
virtual int | getFontSize () override |
|
virtual int | getGlyphHeight (Uint32 ch) const override |
|
virtual int | getGlyphWidth (Uint32 ch) const override |
|
virtual int | getFontAscent () override |
|
virtual void | setFontSize (int p_size) override |
|
virtual void | setFontStyle (const FontStyle &style) override |
|
virtual FontStyle | getFontStyle () override |
|
AssetHandle | getResourceHandle () const |
|
int | getBitmapFontWidth () const |
|
int | getBitmapFontHeight () const |
|
void | setBitmapFontWidth (int width) |
|
void | setBitmapFontHeight (int height) |
|
int | getFontSize () const |
|
int | getWordWidth (const std::string &word) const |
|
int | getWordHeight (const std::string &word) const |
|
FontType | getFontType () const |
|
virtual bool | onUnitTest () override |
| Runs unit tests for this object.
|
|
const std::string & | getType () const |
|
const std::string & | getName () const |
|
const std::string & | getFilename () const |
|
bool | isInternal () const |
|
bool | isLoaded () const |
|
void | setType (const std::string &type) |
|
void | setName (const std::string &name) |
|
void | setFilename (const std::string &filename) |
|
template<typename T > |
T * | as () |
|
void | registerLuaBindings (const std::string &typeName, sol::state_view lua) |
|
|
| BitmapFont (const InitStruct &init) |
|
| BitmapFont (const sol::table &config) |
|
void | initializeOutlineGlyph (Uint32 ch, int x, int y) |
|
void | drawForegroundGlyph (Uint32 ch, int x, int y, const FontStyle &style) |
|
void | drawOutlineGlyph (Uint32 ch, int x, int y, const FontStyle &style) |
|
void | drawDropShadowGlyph (Uint32 ch, int x, int y, const FontStyle &style) |
|
virtual void | _registerLuaBindings (const std::string &typeName, sol::state_view lua) |
|
◆ FontType
Enumerator |
---|
Bitmap | |
Truetype | |
◆ BitmapFont() [1/2]
SDOM::BitmapFont::BitmapFont |
( |
const InitStruct & |
init | ) |
|
|
protected |
◆ BitmapFont() [2/2]
SDOM::BitmapFont::BitmapFont |
( |
const sol::table & |
config | ) |
|
|
protected |
◆ ~BitmapFont()
SDOM::BitmapFont::~BitmapFont |
( |
| ) |
|
|
overridevirtual |
◆ _registerLuaBindings()
void SDOM::BitmapFont::_registerLuaBindings |
( |
const std::string & |
typeName, |
|
|
sol::state_view |
lua |
|
) |
| |
|
protectedvirtual |
◆ applyBitmapFontDefaults()
void SDOM::IFontObject::applyBitmapFontDefaults |
( |
class Factory & |
factory, |
|
|
const std::string & |
fontResourceName, |
|
|
int & |
outFontSize, |
|
|
int & |
outFontWidth, |
|
|
int & |
outFontHeight |
|
) |
| |
|
staticinherited |
◆ as()
template<typename T >
T * SDOM::IAssetObject::as |
( |
| ) |
|
|
inlineinherited |
◆ create()
void SDOM::BitmapFont::create |
( |
const sol::table & |
config | ) |
|
|
overridevirtual |
◆ CreateFromInitStruct()
◆ CreateFromLua()
static std::unique_ptr< IAssetObject > SDOM::BitmapFont::CreateFromLua |
( |
const sol::table & |
config | ) |
|
|
inlinestatic |
◆ drawDropShadowGlyph()
void SDOM::BitmapFont::drawDropShadowGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
protected |
◆ drawForegroundGlyph()
void SDOM::BitmapFont::drawForegroundGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
protected |
◆ drawGlyph()
void SDOM::BitmapFont::drawGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ drawOutlineGlyph()
void SDOM::BitmapFont::drawOutlineGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
protected |
◆ drawPhrase()
void SDOM::BitmapFont::drawPhrase |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ drawPhraseDropshadow()
void SDOM::BitmapFont::drawPhraseDropshadow |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ drawPhraseOutline()
void SDOM::BitmapFont::drawPhraseOutline |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ getBitmapFontHeight()
int SDOM::BitmapFont::getBitmapFontHeight |
( |
| ) |
const |
|
inline |
◆ getBitmapFontWidth()
int SDOM::BitmapFont::getBitmapFontWidth |
( |
| ) |
const |
|
inline |
◆ getFilename()
const std::string & SDOM::IAssetObject::getFilename |
( |
| ) |
const |
|
inlineinherited |
◆ getFontAscent()
int SDOM::BitmapFont::getFontAscent |
( |
| ) |
|
|
overridevirtual |
◆ getFontSize() [1/2]
int SDOM::IFontObject::getFontSize |
( |
| ) |
const |
|
inlineinherited |
◆ getFontSize() [2/2]
int SDOM::BitmapFont::getFontSize |
( |
| ) |
|
|
overridevirtual |
◆ getFontStyle()
◆ getFontType()
FontType SDOM::IFontObject::getFontType |
( |
| ) |
const |
|
inlineinherited |
◆ getGlyphHeight()
int SDOM::BitmapFont::getGlyphHeight |
( |
Uint32 |
ch | ) |
const |
|
overridevirtual |
◆ getGlyphMetrics()
bool SDOM::BitmapFont::getGlyphMetrics |
( |
Uint32 |
ch, |
|
|
int * |
minx, |
|
|
int * |
maxx, |
|
|
int * |
miny, |
|
|
int * |
maxy, |
|
|
int * |
advance |
|
) |
| const |
|
overridevirtual |
◆ getGlyphWidth()
int SDOM::BitmapFont::getGlyphWidth |
( |
Uint32 |
ch | ) |
const |
|
overridevirtual |
◆ getName()
const std::string & SDOM::IAssetObject::getName |
( |
| ) |
const |
|
inlineinherited |
◆ getResourceHandle()
AssetHandle SDOM::BitmapFont::getResourceHandle |
( |
| ) |
const |
|
inline |
◆ getType()
const std::string & SDOM::IAssetObject::getType |
( |
| ) |
const |
|
inlineinherited |
◆ getWordHeight()
int SDOM::IFontObject::getWordHeight |
( |
const std::string & |
word | ) |
const |
|
inherited |
◆ getWordWidth()
int SDOM::IFontObject::getWordWidth |
( |
const std::string & |
word | ) |
const |
|
inherited |
◆ initializeOutlineGlyph()
void SDOM::BitmapFont::initializeOutlineGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
protected |
◆ isInternal()
bool SDOM::IAssetObject::isInternal |
( |
| ) |
const |
|
inlineinherited |
◆ isLoaded()
bool SDOM::IAssetObject::isLoaded |
( |
| ) |
const |
|
inlineinherited |
◆ lua_value_case_insensitive()
template<typename T >
static T SDOM::IDataObject::lua_value_case_insensitive |
( |
const sol::table & |
tbl, |
|
|
const std::string & |
key, |
|
|
const T & |
default_value |
|
) |
| |
|
inlinestaticinherited |
◆ onInit()
bool SDOM::BitmapFont::onInit |
( |
| ) |
|
|
overridevirtual |
◆ onLoad()
void SDOM::BitmapFont::onLoad |
( |
| ) |
|
|
overridevirtual |
◆ onQuit()
void SDOM::BitmapFont::onQuit |
( |
| ) |
|
|
overridevirtual |
◆ onUnitTest()
virtual bool SDOM::IAssetObject::onUnitTest |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ onUnload()
void SDOM::BitmapFont::onUnload |
( |
| ) |
|
|
overridevirtual |
◆ registerLuaBindings()
void SDOM::IDataObject::registerLuaBindings |
( |
const std::string & |
typeName, |
|
|
sol::state_view |
lua |
|
) |
| |
|
inlineinherited |
◆ setBitmapFontHeight()
void SDOM::BitmapFont::setBitmapFontHeight |
( |
int |
height | ) |
|
|
inline |
◆ setBitmapFontWidth()
void SDOM::BitmapFont::setBitmapFontWidth |
( |
int |
width | ) |
|
|
inline |
◆ setFilename()
void SDOM::IAssetObject::setFilename |
( |
const std::string & |
filename | ) |
|
|
inlineinherited |
◆ setFontSize()
void SDOM::BitmapFont::setFontSize |
( |
int |
p_size | ) |
|
|
overridevirtual |
◆ setFontStyle()
void SDOM::BitmapFont::setFontStyle |
( |
const FontStyle & |
style | ) |
|
|
overridevirtual |
◆ setName()
void SDOM::IAssetObject::setName |
( |
const std::string & |
name | ) |
|
|
inlineinherited |
◆ setType()
void SDOM::IAssetObject::setType |
( |
const std::string & |
type | ) |
|
|
inlineinherited |
◆ activeFontHeight_
int SDOM::BitmapFont::activeFontHeight_ = -1 |
|
protected |
◆ activeFontWidth_
int SDOM::BitmapFont::activeFontWidth_ = -1 |
|
protected |
◆ bitmapFontHeight_
int SDOM::BitmapFont::bitmapFontHeight_ = -1 |
|
protected |
◆ bitmapFontWidth_
int SDOM::BitmapFont::bitmapFontWidth_ = -1 |
|
protected |
◆ Core
friend SDOM::IFontObject::Core |
|
protectedinherited |
◆ Factory
friend SDOM::IFontObject::Factory |
|
protectedinherited |
◆ filename_
std::string SDOM::IAssetObject::filename_ |
|
protectedinherited |
◆ fontSize_
int SDOM::IFontObject::fontSize_ = 8 |
|
protectedinherited |
◆ fontType_
◆ FontTypeToString
std::unordered_map<FontType, std::string> SDOM::IFontObject::FontTypeToString |
|
inlinestaticinherited |
◆ isInternal_
bool SDOM::IAssetObject::isInternal_ |
|
protectedinherited |
◆ isLoaded_
bool SDOM::IAssetObject::isLoaded_ = false |
|
protectedinherited |
◆ name_
std::string SDOM::IAssetObject::name_ |
|
protectedinherited |
◆ objHandleType_
sol::usertype<IAssetObject> SDOM::IAssetObject::objHandleType_ |
|
protectedinherited |
◆ outlineTextures
std::vector<std::vector<SDL_Texture*> > SDOM::BitmapFont::outlineTextures |
|
protected |
◆ spriteSheet_
◆ StringToFontType
std::unordered_map<std::string, FontType> SDOM::IFontObject::StringToFontType |
|
inlinestaticinherited |
◆ type_
std::string SDOM::IAssetObject::type_ |
|
protectedinherited |
◆ TypeName
constexpr const char* SDOM::BitmapFont::TypeName = "bitmap" |
|
staticconstexpr |
The documentation for this class was generated from the following files: