Rocket::Core::FontEffectOutline Class Reference

#include <FontEffectOutline.h>

Inheritance diagram for Rocket::Core::FontEffectOutline:
Collaboration diagram for Rocket::Core::FontEffectOutline:

Public Member Functions

bool Initialise (int width)
virtual bool HasUniqueTexture () const
virtual bool GetGlyphMetrics (Vector2i &origin, Vector2i &dimensions, const FontGlyph &glyph) const
virtual void GenerateGlyphTexture (byte *destination_data, const Vector2i &destination_dimensions, int destination_stride, const FontGlyph &glyph) const

Detailed Description

A concrete font effect for rendering outlines around text.

Author:
Peter Curry

Member Function Documentation

bool Rocket::Core::FontEffectOutline::Initialise ( int  width  ) 

Initialise the outline effect.

Parameters:
[in] width The width of the effect. This must be greater than zero.
Returns:
True if the effect initialised successfully, false if not.

bool Rocket::Core::FontEffectOutline::HasUniqueTexture (  )  const [virtual]

Returns true.

Returns:
True.

Reimplemented from Rocket::Core::FontEffect.

virtual bool Rocket::Core::FontEffectOutline::GetGlyphMetrics ( Vector2i origin,
Vector2i dimensions,
const FontGlyph glyph 
) const [virtual]

Resizes and repositions the glyph to fit the outline.

Parameters:
[out] origin The desired origin of the effect's glyph bitmap, as a pixel offset from its original origin. This defaults to (0, 0).
[out] dimensions The desired dimensions of the effect's glyph bitmap, in pixels. This defaults to the dimensions of the glyph's original bitmap.
[in] glyph The glyph the effect is being asked to size.
Returns:
False if the effect is not providing support for the glyph, true otherwise.

Reimplemented from Rocket::Core::FontEffect.

void Rocket::Core::FontEffectOutline::GenerateGlyphTexture ( byte *  destination_data,
const Vector2i destination_dimensions,
int  destination_stride,
const FontGlyph glyph 
) const [virtual]

Expands the original glyph texture for the outline.

Parameters:
[out] destination_data The top-left corner of the glyph's 32-bit, RGBA-ordered, destination texture. Note that they glyph shares its texture with other glyphs.
[in] destination_dimensions The dimensions of the glyph's area on its texture.
[in] destination_stride The stride of the glyph's texture.
[in] glyph The glyph the effect is being asked to generate an effect texture for.

Reimplemented from Rocket::Core::FontEffect.


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