#include <SDOM_TruetypeFont.hpp>
|
virtual | ~TruetypeFont () 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 | getGlyphHeight (Uint32 ch) const override |
|
virtual int | getGlyphWidth (Uint32 ch) const override |
|
virtual int | getFontAscent () override |
|
virtual int | getFontSize () override |
|
virtual void | setFontSize (int p_size) override |
|
virtual void | setFontStyle (const FontStyle &style) override |
|
virtual FontStyle | getFontStyle () override |
|
AssetHandle | getResourceHandle () const |
|
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) |
|
|
| TruetypeFont (const InitStruct &init) |
|
| TruetypeFont (const sol::table &config) |
|
TTF_Font * | _getValidTTFFontPtr () const |
|
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 | |
◆ TruetypeFont() [1/2]
SDOM::TruetypeFont::TruetypeFont |
( |
const InitStruct & |
init | ) |
|
|
protected |
◆ TruetypeFont() [2/2]
SDOM::TruetypeFont::TruetypeFont |
( |
const sol::table & |
config | ) |
|
|
protected |
◆ ~TruetypeFont()
SDOM::TruetypeFont::~TruetypeFont |
( |
| ) |
|
|
overridevirtual |
◆ _getValidTTFFontPtr()
TTF_Font * SDOM::TruetypeFont::_getValidTTFFontPtr |
( |
| ) |
const |
|
protected |
◆ _registerLuaBindings()
void SDOM::TruetypeFont::_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::TruetypeFont::create |
( |
const sol::table & |
config | ) |
|
|
overridevirtual |
◆ CreateFromInitStruct()
◆ CreateFromLua()
static std::unique_ptr< IAssetObject > SDOM::TruetypeFont::CreateFromLua |
( |
const sol::table & |
config | ) |
|
|
inlinestatic |
◆ drawDropShadowGlyph()
void SDOM::TruetypeFont::drawDropShadowGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
protected |
◆ drawForegroundGlyph()
void SDOM::TruetypeFont::drawForegroundGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
protected |
◆ drawGlyph()
void SDOM::TruetypeFont::drawGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ drawOutlineGlyph()
void SDOM::TruetypeFont::drawOutlineGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
protected |
◆ drawPhrase()
void SDOM::TruetypeFont::drawPhrase |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ drawPhraseDropshadow()
void SDOM::TruetypeFont::drawPhraseDropshadow |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ drawPhraseOutline()
void SDOM::TruetypeFont::drawPhraseOutline |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
overridevirtual |
◆ getFilename()
const std::string & SDOM::IAssetObject::getFilename |
( |
| ) |
const |
|
inlineinherited |
◆ getFontAscent()
int SDOM::TruetypeFont::getFontAscent |
( |
| ) |
|
|
overridevirtual |
◆ getFontSize() [1/2]
int SDOM::IFontObject::getFontSize |
( |
| ) |
const |
|
inlineinherited |
◆ getFontSize() [2/2]
int SDOM::TruetypeFont::getFontSize |
( |
| ) |
|
|
overridevirtual |
◆ getFontStyle()
FontStyle SDOM::TruetypeFont::getFontStyle |
( |
| ) |
|
|
overridevirtual |
◆ getFontType()
FontType SDOM::IFontObject::getFontType |
( |
| ) |
const |
|
inlineinherited |
◆ getGlyphHeight()
int SDOM::TruetypeFont::getGlyphHeight |
( |
Uint32 |
ch | ) |
const |
|
overridevirtual |
◆ getGlyphMetrics()
bool SDOM::TruetypeFont::getGlyphMetrics |
( |
Uint32 |
ch, |
|
|
int * |
minx, |
|
|
int * |
maxx, |
|
|
int * |
miny, |
|
|
int * |
maxy, |
|
|
int * |
advance |
|
) |
| const |
|
overridevirtual |
◆ getGlyphWidth()
int SDOM::TruetypeFont::getGlyphWidth |
( |
Uint32 |
ch | ) |
const |
|
overridevirtual |
◆ getName()
const std::string & SDOM::IAssetObject::getName |
( |
| ) |
const |
|
inlineinherited |
◆ getResourceHandle()
AssetHandle SDOM::TruetypeFont::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::TruetypeFont::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::TruetypeFont::onInit |
( |
| ) |
|
|
overridevirtual |
◆ onLoad()
void SDOM::TruetypeFont::onLoad |
( |
| ) |
|
|
overridevirtual |
◆ onQuit()
void SDOM::TruetypeFont::onQuit |
( |
| ) |
|
|
overridevirtual |
◆ onUnitTest()
virtual bool SDOM::IAssetObject::onUnitTest |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ onUnload()
void SDOM::TruetypeFont::onUnload |
( |
| ) |
|
|
overridevirtual |
◆ registerLuaBindings()
void SDOM::IDataObject::registerLuaBindings |
( |
const std::string & |
typeName, |
|
|
sol::state_view |
lua |
|
) |
| |
|
inlineinherited |
◆ setFilename()
void SDOM::IAssetObject::setFilename |
( |
const std::string & |
filename | ) |
|
|
inlineinherited |
◆ setFontSize()
void SDOM::TruetypeFont::setFontSize |
( |
int |
p_size | ) |
|
|
overridevirtual |
◆ setFontStyle()
void SDOM::TruetypeFont::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::TruetypeFont::activeFontHeight_ = -1 |
|
protected |
◆ activeFontWidth_
int SDOM::TruetypeFont::activeFontWidth_ = -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 |
◆ last_size_
int SDOM::TruetypeFont::last_size_ = 0 |
|
protected |
◆ name_
std::string SDOM::IAssetObject::name_ |
|
protectedinherited |
◆ objHandleType_
sol::usertype<IAssetObject> SDOM::IAssetObject::objHandleType_ |
|
protectedinherited |
◆ StringToFontType
std::unordered_map<std::string, FontType> SDOM::IFontObject::StringToFontType |
|
inlinestaticinherited |
◆ ttf_font_handle_
◆ type_
std::string SDOM::IAssetObject::type_ |
|
protectedinherited |
◆ TypeName
constexpr const char* SDOM::TruetypeFont::TypeName = "truetype" |
|
staticconstexpr |
The documentation for this class was generated from the following files: