Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::FontPainter Class Reference

Painter that renders FontMesh instances. More...

#include <spk_font_painter.hpp>

Inheritance diagram for spk::FontPainter:
Inheritance graph
Collaboration diagram for spk::FontPainter:
Collaboration graph

Public Member Functions

 FontPainter ()
 Builds a font painter with its rendering pipeline.
void setLayer (const float &p_layer)
 Sets the layer value used during rendering.
const float & layer () const
 Returns the current layer value.
void setMesh (const FontMesh *p_mesh) override
 Sets the font mesh to render.
void setGlyphColor (const spk::Color &p_color)
 Sets the glyph fill color.
void setOutlineColor (const spk::Color &p_color)
 Sets the glyph outline color.
void setColors (const spk::Color &p_glyphColor, const spk::Color &p_outlineColor)
 Sets glyph and outline colors together.
const spk::ColorglyphColor () const
 Returns the current glyph color.
const spk::ColoroutlineColor () const
 Returns the current outline color.
Public Member Functions inherited from spk::MeshPainter< FontMesh >
const Meshmesh () const
 Returns the currently bound mesh.
void render ()
 Renders the current mesh when available.

Additional Inherited Members

Public Types inherited from spk::MeshPainter< FontMesh >
using Mesh
 Mesh type handled by the painter.
Protected Member Functions inherited from spk::MeshPainter< FontMesh >
 MeshPainter (Lumina::Pipeline &p_pipeline)
 Builds a mesh painter bound to a pipeline.
Lumina::Pipeline::Object_objectHandle ()
 Returns the render object handle.

Detailed Description

Painter that renders FontMesh instances.

See also
FontMesh
painter.setLayer(0.2f);
painter.setGlyphColor(spk::Color::White);
Painter that renders FontMesh instances.
Definition spk_font_painter.hpp:248
void setLayer(const float &p_layer)
Sets the layer value used during rendering.
Definition spk_font_painter.cpp:359
void setGlyphColor(const spk::Color &p_color)
Sets the glyph fill color.
Definition spk_font_painter.cpp:395

Member Function Documentation

◆ glyphColor()

const spk::Color & spk::FontPainter::glyphColor ( ) const

Returns the current glyph color.

Returns
Glyph color.

◆ layer()

const float & spk::FontPainter::layer ( ) const

Returns the current layer value.

Returns
Layer value.

◆ outlineColor()

const spk::Color & spk::FontPainter::outlineColor ( ) const

Returns the current outline color.

Returns
Outline color.

◆ setColors()

void spk::FontPainter::setColors ( const spk::Color & p_glyphColor,
const spk::Color & p_outlineColor )

Sets glyph and outline colors together.

Parameters
p_glyphColorGlyph color.
p_outlineColorOutline color.

◆ setGlyphColor()

void spk::FontPainter::setGlyphColor ( const spk::Color & p_color)

Sets the glyph fill color.

Parameters
p_colorGlyph color.

◆ setLayer()

void spk::FontPainter::setLayer ( const float & p_layer)

Sets the layer value used during rendering.

Parameters
p_layerLayer value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMesh()

void spk::FontPainter::setMesh ( const FontMesh * p_mesh)
overridevirtual

Sets the font mesh to render.

Parameters
p_meshMesh pointer or nullptr to detach.

Reimplemented from spk::MeshPainter< FontMesh >.

Here is the call graph for this function:

◆ setOutlineColor()

void spk::FontPainter::setOutlineColor ( const spk::Color & p_color)

Sets the glyph outline color.

Parameters
p_colorOutline color.

The documentation for this class was generated from the following files:
  • includes/structure/graphics/painter/spk_font_painter.hpp
  • srcs/structure/graphics/painter/spk_font_painter.cpp