FTGL 2.4.0
Public Member Functions | Protected Member Functions | Friends
FTLayout Class Referenceabstract

FTLayout is the interface for layout managers that render text. More...

#include <FTLayout.h>

Inheritance diagram for FTLayout:
FTSimpleLayout

Public Member Functions

virtual ~FTLayout ()
 Destructor.
 
virtual FTBBox BBox (const char *string, const int len=-1, FTPoint position=FTPoint())=0
 Get the bounding box for a formatted string.
 
virtual FTBBox BBox (const wchar_t *string, const int len=-1, FTPoint position=FTPoint())=0
 Get the bounding box for a formatted string.
 
virtual void Render (const char *string, const int len=-1, FTPoint position=FTPoint(), int renderMode=FTGL::RENDER_ALL)=0
 Render a string of characters.
 
virtual void Render (const wchar_t *string, const int len=-1, FTPoint position=FTPoint(), int renderMode=FTGL::RENDER_ALL)=0
 Render a string of characters.
 
virtual FT_Error Error () const
 Queries the Layout for errors.
 

Protected Member Functions

 FTLayout ()
 

Friends

class FTSimpleLayout
 

Detailed Description

FTLayout is the interface for layout managers that render text.

Specific layout manager classes are derived from this class. This class is abstract and deriving classes must implement the protected Render methods to render formatted text and BBox methods to determine the bounding box of output text.

See also
FTFont
FTBBox

Definition at line 52 of file FTLayout.h.

Constructor & Destructor Documentation

◆ FTLayout()

FTLayout::FTLayout ( )
protected

◆ ~FTLayout()

virtual FTLayout::~FTLayout ( )
virtual

Destructor.

Member Function Documentation

◆ BBox() [1/2]

virtual FTBBox FTLayout::BBox ( const char *  string,
const int  len = -1,
FTPoint  position = FTPoint() 
)
pure virtual

Get the bounding box for a formatted string.

Parameters
stringA char string.
lenThe length of the string. If < 0 then all characters will be checked until a null character is encountered (optional).
positionThe pen position of the first character (optional).
Returns
The corresponding bounding box.

Implemented in FTSimpleLayout.

◆ BBox() [2/2]

virtual FTBBox FTLayout::BBox ( const wchar_t *  string,
const int  len = -1,
FTPoint  position = FTPoint() 
)
pure virtual

Get the bounding box for a formatted string.

Parameters
stringA wchar_t string.
lenThe length of the string. If < 0 then all characters will be checked until a null character is encountered (optional).
positionThe pen position of the first character (optional).
Returns
The corresponding bounding box.

Implemented in FTSimpleLayout.

◆ Error()

virtual FT_Error FTLayout::Error ( ) const
virtual

Queries the Layout for errors.

Returns
The current error code.

◆ Render() [1/2]

virtual void FTLayout::Render ( const char *  string,
const int  len = -1,
FTPoint  position = FTPoint(),
int  renderMode = FTGL::RENDER_ALL 
)
pure virtual

Render a string of characters.

Parameters
string'C' style string to be output.
lenThe length of the string. If < 0 then all characters will be displayed until a null character is encountered (optional).
positionThe pen position of the first character (optional).
renderModeRender mode to display (optional)

Implemented in FTSimpleLayout.

◆ Render() [2/2]

virtual void FTLayout::Render ( const wchar_t *  string,
const int  len = -1,
FTPoint  position = FTPoint(),
int  renderMode = FTGL::RENDER_ALL 
)
pure virtual

Render a string of characters.

Parameters
stringwchar_t string to be output.
lenThe length of the string. If < 0 then all characters will be displayed until a null character is encountered (optional).
positionThe pen position of the first character (optional).
renderModeRender mode to display (optional)

Implemented in FTSimpleLayout.

Friends And Related Symbol Documentation

◆ FTSimpleLayout

friend class FTSimpleLayout
friend

Definition at line 67 of file FTLayout.h.


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