Fluxus::TextPrimitive Class Reference

#include <TextPrimitive.h>

Inheritance diagram for Fluxus::TextPrimitive:

Inheritance graph
[legend]
Collaboration diagram for Fluxus::TextPrimitive:

Collaboration graph
[legend]

Public Member Functions

 TextPrimitive (float charw, float charh, int charstride, int wrapchars=0)
 charw,h are in _texture_ coords not pixels
 TextPrimitive (const TextPrimitive &other)
virtual ~TextPrimitive ()
void SetText (const string &s, float Width=10, float Height=10, float Zoom=0)
float GetTextWidth ()
float GetTextHeight ()
Primitive Interface
virtual TextPrimitiveClone () const
virtual void Render ()
virtual string GetTypeName ()
 This needs to be set appropriately for all derived types.

Protected Attributes

float m_CharWidth
float m_CharHeight
int m_CharStride
float m_TextWidth
float m_TextHeight
int m_WrapChars

Friends

istream & operator>> (istream &s, TextPrimitive &o)
ostream & operator<< (ostream &s, TextPrimitive &o)

Detailed Description

A dodgy font drawing primitive, uses texture mapping and quads to form words.
Todo:
add support for proportional fonts, also rendering ttf would be super...

Definition at line 30 of file TextPrimitive.h.


Constructor & Destructor Documentation

TextPrimitive::TextPrimitive ( float  charw,
float  charh,
int  charstride,
int  wrapchars = 0 
)

charw,h are in _texture_ coords not pixels

Definition at line 23 of file TextPrimitive.cpp.

TextPrimitive::TextPrimitive ( const TextPrimitive other  ) 

Definition at line 32 of file TextPrimitive.cpp.

virtual Fluxus::TextPrimitive::~TextPrimitive (  )  [inline, virtual]

Definition at line 36 of file TextPrimitive.h.


Member Function Documentation

TextPrimitive * TextPrimitive::Clone (  )  const [virtual]

Reimplemented from Fluxus::PolyPrimitive.

Definition at line 43 of file TextPrimitive.cpp.

void TextPrimitive::Render (  )  [virtual]

Reimplemented from Fluxus::PolyPrimitive.

Definition at line 96 of file TextPrimitive.cpp.

virtual string Fluxus::TextPrimitive::GetTypeName (  )  [inline, virtual]

This needs to be set appropriately for all derived types.

Reimplemented from Fluxus::PolyPrimitive.

Definition at line 43 of file TextPrimitive.h.

void TextPrimitive::SetText ( const string &  s,
float  Width = 10,
float  Height = 10,
float  Zoom = 0 
)

Definition at line 48 of file TextPrimitive.cpp.

float Fluxus::TextPrimitive::GetTextWidth (  )  [inline]

Definition at line 47 of file TextPrimitive.h.

float Fluxus::TextPrimitive::GetTextHeight (  )  [inline]

Definition at line 48 of file TextPrimitive.h.


Friends And Related Function Documentation

istream& operator>> ( istream &  s,
TextPrimitive o 
) [friend]

Definition at line 103 of file TextPrimitive.cpp.

ostream& operator<< ( ostream &  s,
TextPrimitive o 
) [friend]

Definition at line 108 of file TextPrimitive.cpp.


Field Documentation

float Fluxus::TextPrimitive::m_CharWidth [protected]

Definition at line 52 of file TextPrimitive.h.

float Fluxus::TextPrimitive::m_CharHeight [protected]

Definition at line 53 of file TextPrimitive.h.

int Fluxus::TextPrimitive::m_CharStride [protected]

Definition at line 54 of file TextPrimitive.h.

float Fluxus::TextPrimitive::m_TextWidth [protected]

Definition at line 55 of file TextPrimitive.h.

float Fluxus::TextPrimitive::m_TextHeight [protected]

Definition at line 56 of file TextPrimitive.h.

int Fluxus::TextPrimitive::m_WrapChars [protected]

Definition at line 57 of file TextPrimitive.h.


The documentation for this class was generated from the following files:
Generated on Tue Sep 4 23:22:45 2007 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1