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

◆ Justification

Enumerator
LEFT 
RIGHT 
CENTER 
BOTTOM 
MIDDLE 
TOP 

Definition at line 26 of file TextTTF.h.

◆ ViewportMapping

Enumerator
NONE 
RESCALE 
ADJUST 

Definition at line 34 of file TextTTF.h.

Constructor & Destructor Documentation

◆ TextTTF()

TextTTF ( )

◆ ~TextTTF()

~TextTTF ( )
virtual

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

Definition at line 101 of file TextTTF.cxx.

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

Member Function Documentation

◆ getTextSizePixels()

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

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

Definition at line 633 of file TextTTF.cxx.

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

Referenced by TextTTF::render().

◆ initFont()

void initFont ( )
private

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

Definition at line 264 of file TextTTF.cxx.

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

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

◆ render()

void render ( )

◆ renderCharacter()

void renderCharacter ( char  aChar)
private

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

Definition at line 439 of file TextTTF.cxx.

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

Referenced by TextTTF::renderString().

◆ 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().

◆ setFileName()

void setFileName ( const std::string &  aFileName)

Definition at line 118 of file TextTTF.cxx.

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

◆ setJustification()

void setJustification ( Justification  aH,
Justification  aV 
)

◆ setRotated()

void setRotated ( bool  aYesNo)

Definition at line 140 of file TextTTF.cxx.

References TextTTF::fRotated.

Referenced by OpenGLView::draw_Text().

◆ setSize()

void setSize ( float  aSize)

Definition at line 131 of file TextTTF.cxx.

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

Referenced by OpenGLView::draw_Text().

◆ setString()

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().

◆ setStrings()

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

Definition at line 127 of file TextTTF.cxx.

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

◆ setup()

bool setup ( )
private

Member Data Documentation

◆ fInitFont

bool fInitFont
private

◆ fPointSize

int fPointSize
private

Definition at line 66 of file TextTTF.h.

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

◆ fRotated

bool fRotated
private

Definition at line 69 of file TextTTF.h.

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

◆ fStatus

bool fStatus
private

◆ fTTF

TextTTF_Internal* fTTF
private

◆ fViewportHeight

int fViewportHeight
private

Definition at line 68 of file TextTTF.h.

◆ fViewportWidth

int fViewportWidth
private

Definition at line 67 of file TextTTF.h.

◆ m_fileName

std::string m_fileName
private

Definition at line 55 of file TextTTF.h.

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

◆ m_horizontalJustification

Justification m_horizontalJustification
private

Definition at line 58 of file TextTTF.h.

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

◆ m_size

float m_size
private

Definition at line 57 of file TextTTF.h.

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

◆ m_strings

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

◆ m_verticalJustification

Justification m_verticalJustification
private

Definition at line 59 of file TextTTF.h.

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

◆ m_viewportMapping

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