FastUIDraw
Classes | Public Member Functions | List of all members
fastuidraw::FreeTypeFace Class Reference

A FreeTypeFace wraps an FT_Face object of the FreeType library together with a mutex in a reference counted object. More...

#include <freetype_face.hpp>

Inheritance diagram for fastuidraw::FreeTypeFace:
Inheritance graph
[legend]

Classes

class  GeneratorBase
 A Generator provides an interface to create FreeTypeFace objects. More...
 
class  GeneratorFile
 Implementation of GeneratorBase to create a FreeTypeFace from a face index / file pair via lib FreeType's FT_New_Face. More...
 
class  GeneratorMemory
 Implementation of GeneratorBase to create a FreeTypeFace from a face index / file pair via lib FreeType's FT_New_Memory_Face. More...
 

Public Member Functions

 FreeTypeFace (FT_Face pFace, const reference_counted_ptr< FreeTypeLib > &pLib)
 
FT_Face face (void)
 
const reference_counted_ptr< FreeTypeLib > & lib (void) const
 
void lock (void)
 
bool try_lock (void)
 
void unlock (void)
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

A FreeTypeFace wraps an FT_Face object of the FreeType library together with a mutex in a reference counted object.

The threading model for the FreeType appears to be:

Definition at line 46 of file freetype_face.hpp.

Constructor & Destructor Documentation

◆ FreeTypeFace()

fastuidraw::FreeTypeFace::FreeTypeFace ( FT_Face  pFace,
const reference_counted_ptr< FreeTypeLib > &  pLib 
)

Ctor.

Parameters
pFacethe underlying FT_Face; the created FreeTypeFace takes ownership of pFace and pFace will be deleted when the created FreeTypeFace is deleted.
pLibthe FreeTypeLib that was used to create pFace

Member Function Documentation

◆ face()

FT_Face fastuidraw::FreeTypeFace::face ( void  )

Returns the FT_Face object about which this object wraps.

◆ lib()

const reference_counted_ptr<FreeTypeLib>& fastuidraw::FreeTypeFace::lib ( void  ) const

Returns the FreeTypeLib that was used to create the FT_Face face().

◆ lock()

void fastuidraw::FreeTypeFace::lock ( void  )

Aquire the lock of the mutex used to access/use the FT_Face return by face() safely across multiple threads.

◆ try_lock()

bool fastuidraw::FreeTypeFace::try_lock ( void  )

Try to aquire the lock of the mutex. Return true on success.

◆ unlock()

void fastuidraw::FreeTypeFace::unlock ( void  )

Release the lock of the mutex used to access/use the FT_Face return by face() safely across multiple threads.


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