Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::Glyph Class Reference

The Glyph associated to a character of a given Font. More...

#include <Font.hpp>

+ Inheritance diagram for vl::Glyph:

Public Member Functions

 Glyph ()
 
 ~Glyph ()
 
unsigned int textureHandle () const
 
void setTextureHandle (unsigned int handle)
 
int width () const
 
void setWidth (int width)
 
int height () const
 
void setHeight (int height)
 
int left () const
 
void setLeft (int left)
 
int top () const
 
void setTop (int top)
 
float s0 () const
 
void setS0 (float s0)
 
float t0 () const
 
void setT0 (float t0)
 
float s1 () const
 
void setS1 (float s1)
 
float t1 () const
 
void setT1 (float t1)
 
const fvec2advance () const
 
void setAdvance (const fvec2 &advance)
 
unsigned int glyphIndex () const
 
void setGlyphIndex (unsigned int glyph_index)
 
const Fontfont () const
 
void setFont (Font *font)
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

FontmFont
 
fvec2 mAdvance
 
float mS0
 
float mT0
 
float mS1
 
float mT1
 
unsigned int mGlyphIndex
 
unsigned int mTextureHandle
 
int mWidth
 
int mHeight
 
int mLeft
 
int mTop
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

The Glyph associated to a character of a given Font.

Definition at line 55 of file Font.hpp.

Constructor & Destructor Documentation

◆ Glyph()

vl::Glyph::Glyph ( )
inline

Definition at line 67 of file Font.hpp.

References ~Glyph().

◆ ~Glyph()

vl::Glyph::~Glyph ( )

Referenced by Glyph().

Member Function Documentation

◆ advance()

const fvec2& vl::Glyph::advance ( ) const
inline

◆ font()

const Font* vl::Glyph::font ( ) const
inline

Definition at line 104 of file Font.hpp.

References mFont.

Referenced by setFont().

◆ glyphIndex()

unsigned int vl::Glyph::glyphIndex ( ) const
inline

◆ height()

int vl::Glyph::height ( ) const
inline

◆ left()

int vl::Glyph::left ( ) const
inline

◆ s0()

float vl::Glyph::s0 ( ) const
inline

Definition at line 86 of file Font.hpp.

References mS0.

Referenced by vl::Text::renderText(), vl::CoreText::renderText(), and setS0().

◆ s1()

float vl::Glyph::s1 ( ) const
inline

Definition at line 92 of file Font.hpp.

References mS1.

Referenced by vl::Text::renderText(), vl::CoreText::renderText(), and setS1().

◆ setAdvance()

void vl::Glyph::setAdvance ( const fvec2 advance)
inline

Definition at line 99 of file Font.hpp.

References advance(), and mAdvance.

◆ setFont()

void vl::Glyph::setFont ( Font font)
inline

Definition at line 105 of file Font.hpp.

References font(), and mFont.

◆ setGlyphIndex()

void vl::Glyph::setGlyphIndex ( unsigned int  glyph_index)
inline

Definition at line 102 of file Font.hpp.

References mGlyphIndex.

◆ setHeight()

void vl::Glyph::setHeight ( int  height)
inline

Definition at line 78 of file Font.hpp.

References height(), and mHeight.

◆ setLeft()

void vl::Glyph::setLeft ( int  left)
inline

Definition at line 81 of file Font.hpp.

References left(), and mLeft.

◆ setS0()

void vl::Glyph::setS0 ( float  s0)
inline

Definition at line 87 of file Font.hpp.

References mS0, and s0().

◆ setS1()

void vl::Glyph::setS1 ( float  s1)
inline

Definition at line 93 of file Font.hpp.

References mS1, and s1().

◆ setT0()

void vl::Glyph::setT0 ( float  t0)
inline

Definition at line 90 of file Font.hpp.

References mT0, and t0().

◆ setT1()

void vl::Glyph::setT1 ( float  t1)
inline

Definition at line 96 of file Font.hpp.

References mT1, and t1().

◆ setTextureHandle()

void vl::Glyph::setTextureHandle ( unsigned int  handle)
inline

Definition at line 72 of file Font.hpp.

References mTextureHandle.

◆ setTop()

void vl::Glyph::setTop ( int  top)
inline

Definition at line 84 of file Font.hpp.

References mTop, and top().

◆ setWidth()

void vl::Glyph::setWidth ( int  width)
inline

Definition at line 75 of file Font.hpp.

References mWidth, and width().

◆ t0()

float vl::Glyph::t0 ( ) const
inline

Definition at line 89 of file Font.hpp.

References mT0.

Referenced by vl::Text::renderText(), vl::CoreText::renderText(), and setT0().

◆ t1()

float vl::Glyph::t1 ( ) const
inline

Definition at line 95 of file Font.hpp.

References mT1.

Referenced by vl::Text::renderText(), vl::CoreText::renderText(), and setT1().

◆ textureHandle()

unsigned int vl::Glyph::textureHandle ( ) const
inline

◆ top()

int vl::Glyph::top ( ) const
inline

◆ width()

int vl::Glyph::width ( ) const
inline

Member Data Documentation

◆ mAdvance

fvec2 vl::Glyph::mAdvance
protected

Definition at line 109 of file Font.hpp.

Referenced by advance(), and setAdvance().

◆ mFont

Font* vl::Glyph::mFont
protected

Definition at line 108 of file Font.hpp.

Referenced by font(), and setFont().

◆ mGlyphIndex

unsigned int vl::Glyph::mGlyphIndex
protected

Definition at line 114 of file Font.hpp.

Referenced by glyphIndex(), and setGlyphIndex().

◆ mHeight

int vl::Glyph::mHeight
protected

Definition at line 117 of file Font.hpp.

Referenced by height(), and setHeight().

◆ mLeft

int vl::Glyph::mLeft
protected

Definition at line 118 of file Font.hpp.

Referenced by left(), and setLeft().

◆ mS0

float vl::Glyph::mS0
protected

Definition at line 110 of file Font.hpp.

Referenced by s0(), and setS0().

◆ mS1

float vl::Glyph::mS1
protected

Definition at line 112 of file Font.hpp.

Referenced by s1(), and setS1().

◆ mT0

float vl::Glyph::mT0
protected

Definition at line 111 of file Font.hpp.

Referenced by setT0(), and t0().

◆ mT1

float vl::Glyph::mT1
protected

Definition at line 113 of file Font.hpp.

Referenced by setT1(), and t1().

◆ mTextureHandle

unsigned int vl::Glyph::mTextureHandle
protected

Definition at line 115 of file Font.hpp.

Referenced by setTextureHandle(), and textureHandle().

◆ mTop

int vl::Glyph::mTop
protected

Definition at line 119 of file Font.hpp.

Referenced by setTop(), and top().

◆ mWidth

int vl::Glyph::mWidth
protected

Definition at line 116 of file Font.hpp.

Referenced by setWidth(), and width().


The documentation for this class was generated from the following file: