FTGL 2.4.0
Public Member Functions
FTBuffer Class Reference

FTBuffer is a helper class for pixel buffers. More...

#include <FTBuffer.h>

Public Member Functions

 FTBuffer ()
 Default constructor.
 
 ~FTBuffer ()
 Destructor.
 
FTPoint Pos () const
 Get the pen's position in the buffer.
 
void Pos (FTPoint arg)
 Set the pen's position in the buffer.
 
void Size (int w, int h)
 Set the buffer's size.
 
int Width () const
 Get the buffer's width.
 
int Height () const
 Get the buffer's height.
 
unsigned char * Pixels () const
 Get the buffer's direct pixel buffer.
 

Detailed Description

FTBuffer is a helper class for pixel buffers.

It provides the interface between FTBufferFont and FTBufferGlyph to optimise rendering operations.

See also
FTBufferGlyph
FTBufferFont

Definition at line 45 of file FTBuffer.h.

Constructor & Destructor Documentation

◆ FTBuffer()

FTBuffer::FTBuffer ( )

Default constructor.

◆ ~FTBuffer()

FTBuffer::~FTBuffer ( )

Destructor.

Member Function Documentation

◆ Height()

int FTBuffer::Height ( ) const
inline

Get the buffer's height.

Returns
The buffer's height, in pixels.

Definition at line 98 of file FTBuffer.h.

◆ Pixels()

unsigned char * FTBuffer::Pixels ( ) const
inline

Get the buffer's direct pixel buffer.

Returns
A read-write pointer to the buffer's pixels.

Definition at line 105 of file FTBuffer.h.

◆ Pos() [1/2]

FTPoint FTBuffer::Pos ( ) const
inline

Get the pen's position in the buffer.

Returns
The pen's position as an FTPoint object.

Definition at line 63 of file FTBuffer.h.

◆ Pos() [2/2]

void FTBuffer::Pos ( FTPoint  arg)
inline

Set the pen's position in the buffer.

Parameters
argAn FTPoint object with the desired pen's position.

Definition at line 73 of file FTBuffer.h.

◆ Size()

void FTBuffer::Size ( int  w,
int  h 
)

Set the buffer's size.

Parameters
wThe buffer's desired width, in pixels.
hThe buffer's desired height, in pixels.

◆ Width()

int FTBuffer::Width ( ) const
inline

Get the buffer's width.

Returns
The buffer's width, in pixels.

Definition at line 91 of file FTBuffer.h.


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