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

osg::TextLayoutParam Class Reference

#include <OSGTextLayoutParam.h>

List of all members.

Public Types

enum  Alignment { ALIGN_FIRST, ALIGN_BEGIN, ALIGN_MIDDLE, ALIGN_END }

Public Member Functions

 TextLayoutParam ()
void setLength (Real32 l)
Real32 getLength (UInt32 index=0) const

Public Attributes

bool horizontal
bool leftToRight
bool topToBottom
Alignment majorAlignment
Alignment minorAlignment
Real32 spacing
std::vector< Real32length
Real32 maxExtend


Detailed Description

Keeps the parameters for the layout operation. For more information about these parameters, the the documentation for the VRML Text and FontStyle nodes - all parameters correspond to fields of these nodes and have exactly the same meaning.

Author:
Patrick Dähne

Definition at line 64 of file OSGTextLayoutParam.h.


Member Enumeration Documentation

enum osg::TextLayoutParam::Alignment
 

Defines the layout alignment

Enumerator:
ALIGN_FIRST 
ALIGN_BEGIN 
ALIGN_MIDDLE 
ALIGN_END 

Definition at line 70 of file OSGTextLayoutParam.h.

00071     {
00072         ALIGN_FIRST,
00073         ALIGN_BEGIN,
00074         ALIGN_MIDDLE,
00075         ALIGN_END
00076     };


Constructor & Destructor Documentation

osg::TextLayoutParam::TextLayoutParam  )  [inline]
 

Creates a new TextLayoutParam object.

Definition at line 43 of file OSGTextLayoutParam.inl.

00044 : horizontal(true), leftToRight(true), topToBottom(true),
00045   majorAlignment(ALIGN_FIRST), minorAlignment(ALIGN_FIRST), spacing(1.f),
00046   length(), maxExtend(0.f)
00047 {}


Member Function Documentation

void osg::TextLayoutParam::setLength Real32  l  )  [inline]
 

Sets the length of the first line and sets the size of the length vector to one. Use this method when you lay out a single line of text.

Parameters:
l The length of the first line.

Definition at line 50 of file OSGTextLayoutParam.inl.

References length.

00051 { length.assign(1, l); }

Real32 osg::TextLayoutParam::getLength UInt32  index = 0  )  const [inline]
 

Returns the length of a single line.

Parameters:
index The index of the line, starting at 0. When the index is larger then the size of the length vector, this method returns 0.
Returns:
The length of the single line.

Definition at line 54 of file OSGTextLayoutParam.inl.

References length.

00055 { return index >= length.size() ? 0.f : length[index]; }


Member Data Documentation

bool osg::TextLayoutParam::horizontal
 

The direction of the layout

Definition at line 82 of file OSGTextLayoutParam.h.

Referenced by osg::TextFace::adjustLineOrigin().

bool osg::TextLayoutParam::leftToRight
 

The x direction of the layout

Definition at line 85 of file OSGTextLayoutParam.h.

Referenced by osg::TextFace::adjustLineOrigin().

bool osg::TextLayoutParam::topToBottom
 

The x direction of the layout

Definition at line 88 of file OSGTextLayoutParam.h.

Referenced by osg::TextFace::adjustLineOrigin().

Alignment osg::TextLayoutParam::majorAlignment
 

The major alignment of the layout

Definition at line 91 of file OSGTextLayoutParam.h.

Referenced by osg::TextFace::adjustLineOrigin(), osg::SimpleStatisticsForeground::draw(), and osg::GraphicStatisticsForeground::drawString().

Alignment osg::TextLayoutParam::minorAlignment
 

The minor alignment of the layout

Definition at line 94 of file OSGTextLayoutParam.h.

Referenced by osg::TextFace::adjustLineOrigin(), osg::SimpleStatisticsForeground::draw(), and osg::GraphicStatisticsForeground::drawString().

Real32 osg::TextLayoutParam::spacing
 

The line spacing

Definition at line 97 of file OSGTextLayoutParam.h.

std::vector<Real32> osg::TextLayoutParam::length
 

The length of the text lines

Definition at line 100 of file OSGTextLayoutParam.h.

Referenced by getLength(), and setLength().

Real32 osg::TextLayoutParam::maxExtend
 

The maximum extend of all lines

Definition at line 120 of file OSGTextLayoutParam.h.


The documentation for this class was generated from the following files:
Generated on Thu Aug 25 04:23:03 2005 for OpenSG by  doxygen 1.4.3