Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

hippodraw::TextTTF Class Reference

#include <TextTTF.h>

Collaboration diagram for hippodraw::TextTTF:

Collaboration graph
[legend]
List of all members.

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 <barrand@lal.in2p3.fr>

Definition at line 24 of file TextTTF.h.

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 ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
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 ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Private Member Functions

bool getTextSizePixels (short &, short &)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void initFont ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void renderCharacter (char)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void renderString (const std::string &)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
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::stringm_strings
Justification m_verticalJustification
ViewportMapping m_viewportMapping


Member Enumeration Documentation

enum hippodraw::TextTTF::Justification
 

Enumerator:
LEFT 
RIGHT 
CENTER 
BOTTOM 
MIDDLE 
TOP 

Definition at line 26 of file TextTTF.h.

enum hippodraw::TextTTF::ViewportMapping
 

Enumerator:
NONE 
RESCALE 
ADJUST 

Definition at line 34 of file TextTTF.h.


Constructor & Destructor Documentation

hippodraw::TextTTF::TextTTF  ) 
 

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

Definition at line 57 of file TextTTF.cxx.

References BOTTOM, fInitFont, fPointSize, fTTF, initFont(), LEFT, m_fileName, m_horizontalJustification, m_size, m_verticalJustification, m_viewportMapping, and NONE.

hippodraw::TextTTF::~TextTTF  )  [virtual]
 

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

Definition at line 101 of file TextTTF.cxx.

References fStatus, and fTTF.


Member Function Documentation

bool hippodraw::TextTTF::getTextSizePixels short &  ,
short & 
[private]
 

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

Definition at line 633 of file TextTTF.cxx.

References std::count(), fStatus, fTTF, and m_strings.

Referenced by render().

void hippodraw::TextTTF::initFont  )  [private]
 

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

Definition at line 264 of file TextTTF.cxx.

References fPointSize, fStatus, fTTF, and m_fileName.

Referenced by render(), and TextTTF().

void hippodraw::TextTTF::render  ) 
 

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

Definition at line 144 of file TextTTF.cxx.

References BOTTOM, CENTER, std::count(), fInitFont, fPointSize, fStatus, fTTF, getTextSizePixels(), initFont(), LEFT, m_horizontalJustification, m_size, m_strings, m_verticalJustification, m_viewportMapping, MIDDLE, NONE, renderString(), RIGHT, and TOP.

Referenced by OpenGLView::draw_Text().

void hippodraw::TextTTF::renderCharacter char   )  [private]
 

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

Definition at line 439 of file TextTTF.cxx.

References fRotated, and fTTF.

Referenced by renderString().

void hippodraw::TextTTF::renderString const std::string  )  [private]
 

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

Definition at line 421 of file TextTTF.cxx.

References std::count(), fTTF, and renderCharacter().

Referenced by render().

void hippodraw::TextTTF::setFileName const std::string  ) 
 

Definition at line 118 of file TextTTF.cxx.

References fInitFont, and m_fileName.

void hippodraw::TextTTF::setJustification Justification  ,
Justification 
 

Definition at line 135 of file TextTTF.cxx.

References fInitFont, m_horizontalJustification, and m_verticalJustification.

Referenced by OpenGLView::draw_Text().

void hippodraw::TextTTF::setRotated bool   ) 
 

Definition at line 140 of file TextTTF.cxx.

References fRotated.

Referenced by OpenGLView::draw_Text().

void hippodraw::TextTTF::setSize float   ) 
 

Definition at line 131 of file TextTTF.cxx.

References fInitFont, and m_size.

Referenced by OpenGLView::draw_Text().

void hippodraw::TextTTF::setString const std::string  ) 
 

Definition at line 122 of file TextTTF.cxx.

References fInitFont, and m_strings.

Referenced by OpenGLView::draw_Text().

void hippodraw::TextTTF::setStrings const std::vector< std::string > &   ) 
 

Definition at line 127 of file TextTTF.cxx.

References fInitFont, and m_strings.

bool hippodraw::TextTTF::setup  )  [private]
 


Member Data Documentation

bool hippodraw::TextTTF::fInitFont [private]
 

Definition at line 65 of file TextTTF.h.

Referenced by render(), setFileName(), setJustification(), setSize(), setString(), setStrings(), and TextTTF().

int hippodraw::TextTTF::fPointSize [private]
 

Definition at line 66 of file TextTTF.h.

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

bool hippodraw::TextTTF::fRotated [private]
 

Definition at line 69 of file TextTTF.h.

Referenced by renderCharacter(), and setRotated().

bool hippodraw::TextTTF::fStatus [private]
 

Definition at line 63 of file TextTTF.h.

Referenced by getTextSizePixels(), initFont(), render(), and ~TextTTF().

TextTTF_Internal* hippodraw::TextTTF::fTTF [private]
 

Definition at line 62 of file TextTTF.h.

Referenced by getTextSizePixels(), initFont(), render(), renderCharacter(), renderString(), TextTTF(), and ~TextTTF().

int hippodraw::TextTTF::fViewportHeight [private]
 

Definition at line 68 of file TextTTF.h.

int hippodraw::TextTTF::fViewportWidth [private]
 

Definition at line 67 of file TextTTF.h.

std::string hippodraw::TextTTF::m_fileName [private]
 

Definition at line 55 of file TextTTF.h.

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

Justification hippodraw::TextTTF::m_horizontalJustification [private]
 

Definition at line 58 of file TextTTF.h.

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

float hippodraw::TextTTF::m_size [private]
 

Definition at line 57 of file TextTTF.h.

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

std::vector<std::string> hippodraw::TextTTF::m_strings [private]
 

Definition at line 56 of file TextTTF.h.

Referenced by getTextSizePixels(), render(), setString(), and setStrings().

Justification hippodraw::TextTTF::m_verticalJustification [private]
 

Definition at line 59 of file TextTTF.h.

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

ViewportMapping hippodraw::TextTTF::m_viewportMapping [private]
 

Definition at line 60 of file TextTTF.h.

Referenced by render(), and TextTTF().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3