| GL Studio C++ Runtime API

Public Member Functions | Protected Types | Protected Attributes | List of all members
GlsTextGrid::UnderlineStrikeThruHelper Class Reference

`#include <gls_text_grid.h>`

## Public Member Functions
| UnderlineStrikeThruHelper (float cellWidth, float cellHeight, float cellYScale, bool shadow, const Vector &shadowOffset, const GlsColor &shadowColor, float underlineOffset, float underlineSize, bool halo, float haloOffset, GlsColor haloColor, bool leftToRight)
void | NewRow ()
void | ProcessCharacter (const CharAttr_t &charAttr, float cellX, float nextCellX, float charY, bool endOfLine)
void | RenderLineSegments (GlsQuadListVC_3D &quadStorage)
void | IgnoreShadowAndHalo ()
| Sets the shadow visibility flag to false.

## Protected Types
typedef std::list< LineSegment_t > | LineSegmentCont_t
| Typedef for a list of line segments.

## Protected Attributes
const float | _cellWidth
| Height of each character cell in the grid in logical units.
const float | _cellHeight
| Width of each character cell in the grid in logical units.
const bool | _shadow
| Whether or not the shadow effect is on.
const Vector | _shadowOffset
| Offset of the shadow effect from the characters. Z component is ignored.
const GlsColor | _shadowColor
| Color of the shadow effect behind the characters.
bool | _allowShadow
| Whether or not shadows are being drawn in general.
const float | _underlineOffset
| Vertical offset of the underline in logical units.
const float | _underlineSize
| Thickness of the underline in logical units.
const bool | _halo
| Whether or not the halo effect is on.
const float | _haloOffset
| Offset multiplier for the halo effect.
const GlsColor | _haloColor
| Color of the halo effect behind the characters.
const bool | _leftToRight
| If true, characters are rendered left to right, otherwise right to left.
float | _underlineX1
| Current underline state left X coordinate.
float | _underlineX2
| Current underline state right X coordinate.
float | _underlineY
| Current underline state Y coordinate.
float | _underlineScale
| Current underline drawing scale.
GlsColor | _underlineColor
| Current underline drawing color.
bool | _underlineOn
| If true, underline drawing is enabled.
float | _strikeX1
| Current strike through state left X coordinate.
float | _strikeX2
| Current strike through state right X coordinate.
float | _strikeY
| Current strike through state Y coordinate.
float | _strikeScale
| Current strike through drawing scale.
GlsColor | _strikeColor
| Current strike through drawing color.
bool | _strikeOn
| If true, strike through drawing is enabled.
LineSegmentCont_t | _lineSegments
| The list of line segments to draw.

## Detailed Description

helper class for processing underline and strike-thru when drawing text grid

## Constructor & Destructor Documentation

## ◆ UnderlineStrikeThruHelper()

UnderlineStrikeThruHelper | ( | float | cellWidth,
|  | float | cellHeight,
|  | float | cellYScale,
|  | bool | shadow,
|  | const Vector & | shadowOffset,
|  | const GlsColor & | shadowColor,
|  | float | underlineOffset,
|  | float | underlineSize,
|  | bool | halo,
|  | float | haloOffset,
|  | GlsColor | haloColor,
|  | bool | leftToRight
| ) |  |

Parameters

  cellWidth | width of a character cell in the text grid
  cellHeight | height of a character cell in the text grid
  cellYScale | unused
  shadow | true if text grid has shadow enabled
  shadowOffset | offset for shadow
  shadowColor | color of shadow in text grid
  underlineOffset | offset of underline
  underlineSize | size of underline
  halo | true if text grid has halo enabled
  haloOffset | offset for halo
  haloColor | color of halo in text grid
  leftToRight | true if text flows left to right else false for right to left

## Member Function Documentation

## ◆ NewRow()

void NewRow | ( |  | ) |

Setup to process a new row in the text grid

## ◆ ProcessCharacter()

void ProcessCharacter | ( | const CharAttr_t & | charAttr,
|  | float | cellX,
|  | float | nextCellX,
|  | float | charY,
|  | bool | endOfLine
| ) |  |

Pre Process the given character attributes

Parameters

  charAttr | attributes in question
  cellX | x coord of character cell
  nextCellX | x coord of character cell one past the given character
  charY | y coord of character
  endOfLine | true if character was the end of the current line

## ◆ RenderLineSegments()

void RenderLineSegments | ( | GlsQuadListVC_3D & | quadStorage | ) |

Render the line segments for the underline / strikethru

Parameters

  quadStorage | object responsible for holding the quads for the line segments.

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

- gls_text_grid.h