LASi: StringDimensions Class Reference

Public Member Functions | Private Attributes

# StringDimensions Class Reference

Class StringDimensions maintains the relevant dimensions of a text string realized (i.e., drawn) in a given font face and font size. More...

`#include <stringDimensions.h>`

List of all members.

## Public Member Functions
| StringDimensions (double xAdv=0.0, double yMin=0.0, double yMax=0.0, double spacingFactor=1.2)
void | accrueXAdvance (const double xAdv)
| Sum up the individual x advances of each glyph:
void | setYMin (const double yMin)
| Keep a running tab on the minimum y value (descent) from all glyphs:
void | setYMax (const double yMax)
| Keep a running tab on the maximum y value (ascent) from all glyphs:
const double | getXAdvance ()
const double | getYMin ()
const double | getYMax ()
const double | getLineSpacing ()
| Line spacing is just the maximum ascent minus the maximum descent multiplied by the line spacing factor:
## Private Attributes
double | xadv
double | ymin
double | ymax
double | lineSpacingFactor

## Detailed Description

Class StringDimensions maintains the relevant dimensions of a text string realized (i.e., drawn) in a given font face and font size.

Used internally by LASi.

## Constructor & Destructor Documentation

StringDimensions::StringDimensions | ( | double | xAdv = `0.0`,
|  | double | yMin = `0.0`,
|  | double | yMax = `0.0`,
|  | double | spacingFactor = `1.2` |
| ) |  |  | `[inline]`

References lineSpacingFactor, xadv, ymax, and ymin.

## Member Function Documentation

void StringDimensions::accrueXAdvance | ( | const double | xAdv | ) | `[inline]`

Sum up the individual x advances of each glyph:

References xadv.

const double StringDimensions::getLineSpacing | ( |  | ) | `[inline]`

Line spacing is just the maximum ascent minus the maximum descent multiplied by the line spacing factor:

References lineSpacingFactor, ymax, and ymin.

Referenced by LASi::PostscriptDocument::get_dimensions().

const double StringDimensions::getXAdvance | ( |  | ) | `[inline]`

References xadv.

Referenced by LASi::PostscriptDocument::get_dimensions().

const double StringDimensions::getYMax | ( |  | ) | `[inline]`

References ymax.

Referenced by LASi::PostscriptDocument::get_dimensions().

const double StringDimensions::getYMin | ( |  | ) | `[inline]`

References ymin.

Referenced by LASi::PostscriptDocument::get_dimensions().

void StringDimensions::setYMax | ( | const double | yMax | ) | `[inline]`

Keep a running tab on the maximum y value (ascent) from all glyphs:

References ymax.

void StringDimensions::setYMin | ( | const double | yMin | ) | `[inline]`

Keep a running tab on the minimum y value (descent) from all glyphs:

References ymin.

## Member Data Documentation

double StringDimensions::lineSpacingFactor`[private]`

Referenced by getLineSpacing(), and StringDimensions().

double StringDimensions::xadv`[private]`

Referenced by accrueXAdvance(), getXAdvance(), and StringDimensions().

double StringDimensions::ymax`[private]`

Referenced by getLineSpacing(), getYMax(), setYMax(), and StringDimensions().

double StringDimensions::ymin`[private]`

Referenced by getLineSpacing(), getYMin(), setYMin(), and StringDimensions().

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

- stringDimensions.h