le2d v0.4.7
2D game engine framework
 
Loading...
Searching...
No Matches
le::TextGeometry Class Reference

Drawable geometry for text. More...

#include <le2d/text/text_geometry.hpp>

Inheritance diagram for le::TextGeometry:
le::IGeometry

Public Member Functions

auto get_vertices () const -> std::span< Vertex const > final
 
auto get_indices () const -> std::span< std::uint32_t const > final
 
auto get_topology () const -> vk::PrimitiveTopology final
 
void append_glyphs (std::span< kvf::ttf::GlyphLayout const > layouts, glm::vec2 offset={}, kvf::Color color=kvf::white_v)
 
void clear_vertices ()
 
auto get_vertex_array () const -> VertexArray const &
 
auto to_primitive (ITexture const &font_atlas) const -> Primitive
 

Additional Inherited Members

- Static Public Attributes inherited from le::IGeometry
static constexpr auto default_length_v {200.0f}
 

Detailed Description

Drawable geometry for text.

Member Function Documentation

◆ append_glyphs()

void le::TextGeometry::append_glyphs ( std::span< kvf::ttf::GlyphLayout const >  layouts,
glm::vec2  offset = {},
kvf::Color  color = kvf::white_v 
)

◆ clear_vertices()

void le::TextGeometry::clear_vertices ( )
inline

◆ get_indices()

auto le::TextGeometry::get_indices ( ) const -> std::span<std::uint32_t const>
inlinefinalvirtual

Implements le::IGeometry.

◆ get_topology()

auto le::TextGeometry::get_topology ( ) const -> vk::PrimitiveTopology
inlinefinalvirtual

Implements le::IGeometry.

◆ get_vertex_array()

auto le::TextGeometry::get_vertex_array ( ) const -> VertexArray const&
inline

◆ get_vertices()

auto le::TextGeometry::get_vertices ( ) const -> std::span<Vertex const>
inlinefinalvirtual

Implements le::IGeometry.

◆ to_primitive()

auto le::TextGeometry::to_primitive ( ITexture const &  font_atlas) const -> Primitive

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