libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OGLFT::BBox Struct Reference

#include <moOGLFT.h>

Public Member Functions

 BBox ()
 Default constructor is all zeros. More...
 
 BBox (FT_BBox ft_bbox)
 
BBoxoperator*= (double k)
 
BBoxoperator+= (const BBox &b)
 

Public Attributes

float x_min_
 The left-most position at which "ink" appears. More...
 
float y_min_
 the bottom-most position at which "ink" appears. More...
 
float x_max_
 The right-most position at which "ink" appears. More...
 
float y_max_
 The top-most position at which "ink" appears. More...
 
Advance advance_
 The (total) advancement. More...
 

Detailed Description

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

Definition at line 167 of file moOGLFT.h.

Constructor & Destructor Documentation

OGLFT::BBox::BBox ( )
inline

Default constructor is all zeros.

Definition at line 176 of file moOGLFT.h.

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_bboxa FreeType bounding box as retrieved from FT_Glyph_Get_CBox.

Definition at line 186 of file moOGLFT.h.

Member Function Documentation

BBox& OGLFT::BBox::operator*= ( double  k)
inline

Scale the bounding box by a constant.

Parameters
ka constant to scale the bounding box by.
Returns
a reference to oneself.

Definition at line 197 of file moOGLFT.h.

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
bthe bounding box to merge.
Returns
a reference to oneself.

Definition at line 216 of file moOGLFT.h.

Member Data Documentation

Advance OGLFT::BBox::advance_

The (total) advancement.

Definition at line 173 of file moOGLFT.h.

float OGLFT::BBox::x_max_

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

Definition at line 171 of file moOGLFT.h.

float OGLFT::BBox::x_min_

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

Definition at line 169 of file moOGLFT.h.

float OGLFT::BBox::y_max_

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

Definition at line 172 of file moOGLFT.h.

float OGLFT::BBox::y_min_

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

Definition at line 170 of file moOGLFT.h.


The documentation for this struct was generated from the following file: