Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TextTTF Class Reference

TextTTF permits to render text in the pixmap buffer by using the freetype fonts. More...

#include <TextTTF.h>

Collaboration diagram for TextTTF:
Collaboration graph
[legend]

Public Types

enum  Justification {
  LEFT = 0x01, RIGHT = 0x02, CENTER = 0x03, BOTTOM = 0x04,
  MIDDLE = 0x05, TOP = 0x06
}
 
enum  ViewportMapping { NONE, RESCALE, ADJUST }
 

Public Member Functions

void render ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
void setFileName (const std::string &)
 
void setJustification (Justification, Justification)
 
void setRotated (bool)
 
void setSize (float)
 
void setString (const std::string &)
 
void setStrings (const std::vector< std::string > &)
 
 TextTTF ()
 
virtual ~TextTTF ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 

Private Member Functions

bool getTextSizePixels (short &, short &)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
void initFont ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
void renderCharacter (char)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
void renderString (const std::string &)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
bool setup ()
 

Private Attributes

bool fInitFont
 
int fPointSize
 
bool fRotated
 
bool fStatus
 
TextTTF_Internal * fTTF
 
int fViewportHeight
 
int fViewportWidth
 
std::string m_fileName
 
Justification m_horizontalJustification
 
float m_size
 
std::vector< std::string > m_strings
 
Justification m_verticalJustification
 
ViewportMapping m_viewportMapping
 

Detailed Description

TextTTF permits to render text in the pixmap buffer by using the freetype fonts.

It permits to have portable (X11, Win32) rendering for scalable fonts.

Attention
This class was contributed by its author as an experiment to evaluate the core library classes with OpenGl. It is not actively maintained. This class and others in this directory require CMT for its build.
Author
Guy Barrand barra.nosp@m.nd@l.nosp@m.al.in.nosp@m.2p3..nosp@m.fr

Definition at line 24 of file TextTTF.h.

Member Enumeration Documentation

Enumerator
LEFT 
RIGHT 
CENTER 
BOTTOM 
MIDDLE 
TOP 

Definition at line 26 of file TextTTF.h.

Enumerator
NONE 
RESCALE 
ADJUST 

Definition at line 34 of file TextTTF.h.

Constructor & Destructor Documentation

TextTTF ( )
~TextTTF ( )
virtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 101 of file TextTTF.cxx.

References TextTTF::fStatus, and TextTTF::fTTF.

Member Function Documentation

bool getTextSizePixels ( short &  aWidth,
short &  aHeight 
)
private

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 633 of file TextTTF.cxx.

References TextTTF::fStatus, TextTTF::fTTF, i, index, and TextTTF::m_strings.

Referenced by TextTTF::render().

void initFont ( )
private

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 264 of file TextTTF.cxx.

References TextTTF::fPointSize, TextTTF::fStatus, TextTTF::fTTF, i, index, and TextTTF::m_fileName.

Referenced by TextTTF::render(), and TextTTF::TextTTF().

void render ( )
void renderCharacter ( char  aChar)
private

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 439 of file TextTTF.cxx.

References TextTTF::fRotated, TextTTF::fTTF, and index.

Referenced by TextTTF::renderString().

void renderString ( const std::string &  aString)
private

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 421 of file TextTTF.cxx.

References TextTTF::fTTF, and TextTTF::renderCharacter().

Referenced by TextTTF::render().

void setFileName ( const std::string &  aFileName)

Definition at line 118 of file TextTTF.cxx.

References TextTTF::fInitFont, and TextTTF::m_fileName.

void setJustification ( Justification  aH,
Justification  aV 
)
void setRotated ( bool  aYesNo)

Definition at line 140 of file TextTTF.cxx.

References TextTTF::fRotated.

Referenced by OpenGLView::draw_Text().

void setSize ( float  aSize)

Definition at line 131 of file TextTTF.cxx.

References TextTTF::fInitFont, and TextTTF::m_size.

Referenced by OpenGLView::draw_Text().

void setString ( const std::string &  aString)

Definition at line 122 of file TextTTF.cxx.

References TextTTF::fInitFont, and TextTTF::m_strings.

Referenced by OpenGLView::draw_Text().

void setStrings ( const std::vector< std::string > &  aStrings)

Definition at line 127 of file TextTTF.cxx.

References TextTTF::fInitFont, and TextTTF::m_strings.

bool setup ( )
private

Member Data Documentation

bool fInitFont
private
int fPointSize
private

Definition at line 66 of file TextTTF.h.

Referenced by TextTTF::initFont(), TextTTF::render(), and TextTTF::TextTTF().

bool fRotated
private

Definition at line 69 of file TextTTF.h.

Referenced by TextTTF::renderCharacter(), and TextTTF::setRotated().

bool fStatus
private
TextTTF_Internal* fTTF
private
int fViewportHeight
private

Definition at line 68 of file TextTTF.h.

int fViewportWidth
private

Definition at line 67 of file TextTTF.h.

std::string m_fileName
private

Definition at line 55 of file TextTTF.h.

Referenced by TextTTF::initFont(), TextTTF::setFileName(), and TextTTF::TextTTF().

Justification m_horizontalJustification
private

Definition at line 58 of file TextTTF.h.

Referenced by TextTTF::render(), TextTTF::setJustification(), and TextTTF::TextTTF().

float m_size
private

Definition at line 57 of file TextTTF.h.

Referenced by TextTTF::render(), TextTTF::setSize(), and TextTTF::TextTTF().

std::vector<std::string> m_strings
private
Justification m_verticalJustification
private

Definition at line 59 of file TextTTF.h.

Referenced by TextTTF::render(), TextTTF::setJustification(), and TextTTF::TextTTF().

ViewportMapping m_viewportMapping
private

Definition at line 60 of file TextTTF.h.

Referenced by TextTTF::render(), and TextTTF::TextTTF().


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

Generated for HippoDraw Class Library by doxygen