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

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

The direction of the layout

Definition at line 82 of file OSGTextLayoutParam.h.

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

The x direction of the layout

Definition at line 85 of file OSGTextLayoutParam.h.

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

The x direction of the layout

Definition at line 88 of file OSGTextLayoutParam.h.

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

The line spacing

Definition at line 97 of file OSGTextLayoutParam.h.

Referenced by osg::SimpleStatisticsForeground::draw().

The length of the text lines

Definition at line 100 of file OSGTextLayoutParam.h.

Referenced by getLength(), and setLength().

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 Mon Mar 17 12:15:24 2008 for OpenSG by  doxygen 1.5.5