Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

OGLFT::BBox Struct Reference

Describe the metrics of a glyph or string relative to the origin of the first character. More...

#include <OGLFT.h>

List of all members.

Public Methods

 BBox ()
 Default constructor is all zeros.

 BBox (FT_BBox ft_bbox)
BBox& operator *= (double k)
 Scale the bounding box by a constant.
Parameters:
k   a constant to scale the bounding box by.
Returns:
a reference to oneself.


BBox& operator+= (const BBox &b)

Public Attributes

float x_min_
 The left-most position at which "ink" appears.

float y_min_
 the bottom-most position at which "ink" appears.

float x_max_
 The right-most position at which "ink" appears.

float y_max_
 The top-most position at which "ink" appears.

Advance advance_
 The (total) advancement.


Detailed Description

Describe the metrics of a glyph or string relative to the origin of the first character.


Constructor & Destructor Documentation

OGLFT::BBox::BBox ( FT_BBox ft_bbox ) [inline]
 

(Partially) initialize a BBox from a FreeType bounding box member. (The advancement is initialized to zero by its default constructor).

Parameters:
ft_bbox   a FreeType bounding box as retrieved from FT_Glyph_Get_CBox.


Member Function Documentation

BBox & OGLFT::BBox::operator+= ( const BBox & b ) [inline]
 

Merge a bounding box into the current one (not really addition). Each time a BBox is "added", the current BBox is expanded to include the metrics of the new BBox. May only work for horizontal fonts, though.

Parameters:
b   the bounding box to merge.
Returns:
a reference to oneself.


The documentation for this struct was generated from the following file:
Generated at Fri Jul 12 10:47:15 2002 for OGLFT by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001