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

osg::TextLayoutResult Class Reference

#include <OSGTextLayoutResult.h>

List of all members.

Public Member Functions

 TextLayoutResult ()
void clear ()
UInt32 getNumGlyphs () const

Public Attributes

std::vector< TextGlyph::Indexindices
std::vector< Vec2fpositions
std::vector< Vec2flineBounds
Vec2f textBounds


Detailed Description

Keeps the result of a layout operation.
Author:
Patrick Dähne

Definition at line 63 of file OSGTextLayoutResult.h.


Constructor & Destructor Documentation

osg::TextLayoutResult::TextLayoutResult  )  [inline]
 

Creates a new TextLayoutResult object.

Definition at line 43 of file OSGTextLayoutResult.inl.

00044 : indices(), positions(), lineBounds(), textBounds()
00045 {}


Member Function Documentation

void osg::TextLayoutResult::clear  ) 
 

Clears the TextLayoutResult object.

Definition at line 56 of file OSGTextLayoutResult.cpp.

References indices, lineBounds, positions, osg::VecStorage2< ValueTypeT >::setValues(), and textBounds.

00057 {
00058     indices.clear();
00059     positions.clear();
00060     lineBounds.clear();
00061     textBounds.setValues(0.f, 0.f);
00062 }

UInt32 osg::TextLayoutResult::getNumGlyphs  )  const [inline]
 

Returns the number of glyph indices that have a corresponding position.

Returns:
The number of glyphs.

Definition at line 48 of file OSGTextLayoutResult.inl.

References indices, and positions.

Referenced by osg::TextTXFFace::addToGeom(), osg::TextFace::calculateBoundingBox(), osg::SimpleStatisticsForeground::draw(), osg::GraphicStatisticsForeground::drawString(), osg::TextVectorFace::fillGeo(), and osg::TextPixmapFace::makeImage().

00049 { return positions.size() < indices.size() ? positions.size() : indices.size(); }


Member Data Documentation

std::vector<TextGlyph::Index> osg::TextLayoutResult::indices
 

The glyph indices

Definition at line 75 of file OSGTextLayoutResult.h.

Referenced by osg::TextTXFFace::addToGeom(), osg::TextFace::calculateBoundingBox(), clear(), osg::SimpleStatisticsForeground::draw(), osg::GraphicStatisticsForeground::drawString(), osg::TextVectorFace::fillGeo(), getNumGlyphs(), and osg::TextPixmapFace::makeImage().

std::vector<Vec2f> osg::TextLayoutResult::positions
 

The positions of the glyphs

Definition at line 78 of file OSGTextLayoutResult.h.

Referenced by osg::TextTXFFace::addToGeom(), osg::TextFace::adjustLineOrigin(), osg::TextFace::calculateBoundingBox(), clear(), osg::SimpleStatisticsForeground::draw(), osg::GraphicStatisticsForeground::drawString(), osg::TextVectorFace::fillGeo(), getNumGlyphs(), and osg::TextPixmapFace::makeImage().

std::vector<Vec2f> osg::TextLayoutResult::lineBounds
 

The line bounds

Definition at line 88 of file OSGTextLayoutResult.h.

Referenced by clear().

Vec2f osg::TextLayoutResult::textBounds
 

The text bounds

Definition at line 91 of file OSGTextLayoutResult.h.

Referenced by clear().


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