Unravel Engine C++ Reference
Loading...
Searching...
No Matches
gfx::text_buffer Class Reference

Public Member Functions

 text_buffer (font_manager *manager)
 
void resize_buffers (size_t max_buffered_characters)
 
auto get_max_buffered_characters () const -> size_t
 
auto get_outline_color () -> uint32_t
 
auto get_outline_width () -> float
 
auto get_drop_shadow_color () -> uint32_t
 
auto get_drop_shadow_offset_u () -> float
 
auto get_drop_shadow_offset_v () -> float
 
auto get_drop_shadow_softener () -> float
 
void set_style (uint32_t flags=style_normal)
 
void set_text_color (uint32_t rgba=0xff000000)
 
void set_background_color (uint32_t rgba=0xff000000)
 
void set_foreground_color (uint32_t rgba=0xff000000)
 
void set_overline_color (uint32_t rgba=0xff000000)
 
void set_underline_color (uint32_t rgba=0xff000000)
 
void set_strike_through_color (uint32_t rgba=0xff000000)
 
void set_outline_color (uint32_t rgba=0xff000000)
 
void set_outline_width (float outline_width=3.0f)
 
void set_drop_shadow_color (uint32_t rgba=0xff000000)
 
void set_drop_shadow_offset (float u, float v)
 
void set_drop_shadow_softener (float smoother)
 
void set_pen_position (float x, float y)
 
void get_pen_position (float *x, float *y)
 
void set_pen_origin (float x, float y)
 
void set_apply_kerning (bool apply_kerning)
 
void append_text (font_handle font_handle, const char *str, const char *end=nullptr)
 
void append_text (font_handle font_handle, const wchar_t *str, const wchar_t *end=nullptr)
 
void append_atlas_face (font_handle font_handle, uint16_t face_index)
 
void clear_text_buffer ()
 
auto get_vertex_buffer () -> const uint8_t *
 
auto get_vertex_count () const -> uint32_t
 
auto get_vertex_size () const -> uint32_t
 
auto get_index_buffer () const -> const uint16_t *
 
auto get_buffers_dirty () const -> bool
 
void set_buffers_dirty (bool dirty)
 
auto get_index_count () const -> uint32_t
 
auto get_index_size () const -> uint32_t
 
auto get_text_color () const -> uint32_t
 
auto get_rectangle () const -> text_rectangle
 

Detailed Description

Definition at line 64 of file text_buffer_manager.cpp.

Constructor & Destructor Documentation

◆ text_buffer()

gfx::text_buffer::text_buffer ( font_manager * manager)
inline

Definition at line 67 of file text_buffer_manager.cpp.

Member Function Documentation

◆ append_atlas_face()

void gfx::text_buffer::append_atlas_face ( font_handle font_handle,
uint16_t face_index )

Definition at line 431 of file text_buffer_manager.cpp.

◆ append_text() [1/2]

void gfx::text_buffer::append_text ( font_handle font_handle,
const char * str,
const char * end = nullptr )

Definition at line 334 of file text_buffer_manager.cpp.

◆ append_text() [2/2]

void gfx::text_buffer::append_text ( font_handle font_handle,
const wchar_t * str,
const wchar_t * end = nullptr )

Definition at line 388 of file text_buffer_manager.cpp.

◆ clear_text_buffer()

void gfx::text_buffer::clear_text_buffer ( )

Definition at line 471 of file text_buffer_manager.cpp.

◆ get_buffers_dirty()

auto gfx::text_buffer::get_buffers_dirty ( ) const -> bool
inline

Definition at line 227 of file text_buffer_manager.cpp.

◆ get_drop_shadow_color()

auto gfx::text_buffer::get_drop_shadow_color ( ) -> uint32_t
inline

Definition at line 95 of file text_buffer_manager.cpp.

◆ get_drop_shadow_offset_u()

auto gfx::text_buffer::get_drop_shadow_offset_u ( ) -> float
inline

Definition at line 100 of file text_buffer_manager.cpp.

◆ get_drop_shadow_offset_v()

auto gfx::text_buffer::get_drop_shadow_offset_v ( ) -> float
inline

Definition at line 105 of file text_buffer_manager.cpp.

◆ get_drop_shadow_softener()

auto gfx::text_buffer::get_drop_shadow_softener ( ) -> float
inline

Definition at line 110 of file text_buffer_manager.cpp.

◆ get_index_buffer()

auto gfx::text_buffer::get_index_buffer ( ) const -> const uint16_t*
inline

Definition at line 222 of file text_buffer_manager.cpp.

◆ get_index_count()

auto gfx::text_buffer::get_index_count ( ) const -> uint32_t
inline

Definition at line 237 of file text_buffer_manager.cpp.

◆ get_index_size()

auto gfx::text_buffer::get_index_size ( ) const -> uint32_t
inline

Definition at line 242 of file text_buffer_manager.cpp.

◆ get_max_buffered_characters()

auto gfx::text_buffer::get_max_buffered_characters ( ) const -> size_t
inline

Definition at line 80 of file text_buffer_manager.cpp.

◆ get_outline_color()

auto gfx::text_buffer::get_outline_color ( ) -> uint32_t
inline

Definition at line 85 of file text_buffer_manager.cpp.

◆ get_outline_width()

auto gfx::text_buffer::get_outline_width ( ) -> float
inline

Definition at line 90 of file text_buffer_manager.cpp.

◆ get_pen_position()

void gfx::text_buffer::get_pen_position ( float * x,
float * y )
inline

Definition at line 182 of file text_buffer_manager.cpp.

◆ get_rectangle()

auto gfx::text_buffer::get_rectangle ( ) const -> text_rectangle
inline

Definition at line 252 of file text_buffer_manager.cpp.

◆ get_text_color()

auto gfx::text_buffer::get_text_color ( ) const -> uint32_t
inline

Definition at line 247 of file text_buffer_manager.cpp.

◆ get_vertex_buffer()

auto gfx::text_buffer::get_vertex_buffer ( ) -> const uint8_t*
inline

Definition at line 207 of file text_buffer_manager.cpp.

◆ get_vertex_count()

auto gfx::text_buffer::get_vertex_count ( ) const -> uint32_t
inline

Definition at line 212 of file text_buffer_manager.cpp.

◆ get_vertex_size()

auto gfx::text_buffer::get_vertex_size ( ) const -> uint32_t
inline

Definition at line 217 of file text_buffer_manager.cpp.

◆ resize_buffers()

void gfx::text_buffer::resize_buffers ( size_t max_buffered_characters)
inline

Definition at line 73 of file text_buffer_manager.cpp.

◆ set_apply_kerning()

void gfx::text_buffer::set_apply_kerning ( bool apply_kerning)
inline

Definition at line 194 of file text_buffer_manager.cpp.

◆ set_background_color()

void gfx::text_buffer::set_background_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 125 of file text_buffer_manager.cpp.

◆ set_buffers_dirty()

void gfx::text_buffer::set_buffers_dirty ( bool dirty)
inline

Definition at line 232 of file text_buffer_manager.cpp.

◆ set_drop_shadow_color()

void gfx::text_buffer::set_drop_shadow_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 160 of file text_buffer_manager.cpp.

◆ set_drop_shadow_offset()

void gfx::text_buffer::set_drop_shadow_offset ( float u,
float v )
inline

Definition at line 165 of file text_buffer_manager.cpp.

◆ set_drop_shadow_softener()

void gfx::text_buffer::set_drop_shadow_softener ( float smoother)
inline

Definition at line 171 of file text_buffer_manager.cpp.

◆ set_foreground_color()

void gfx::text_buffer::set_foreground_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 130 of file text_buffer_manager.cpp.

◆ set_outline_color()

void gfx::text_buffer::set_outline_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 150 of file text_buffer_manager.cpp.

◆ set_outline_width()

void gfx::text_buffer::set_outline_width ( float outline_width = 3.0f)
inline

Definition at line 155 of file text_buffer_manager.cpp.

◆ set_overline_color()

void gfx::text_buffer::set_overline_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 135 of file text_buffer_manager.cpp.

◆ set_pen_origin()

void gfx::text_buffer::set_pen_origin ( float x,
float y )
inline

Definition at line 188 of file text_buffer_manager.cpp.

◆ set_pen_position()

void gfx::text_buffer::set_pen_position ( float x,
float y )
inline

Definition at line 176 of file text_buffer_manager.cpp.

◆ set_strike_through_color()

void gfx::text_buffer::set_strike_through_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 145 of file text_buffer_manager.cpp.

◆ set_style()

void gfx::text_buffer::set_style ( uint32_t flags = style_normal)
inline

Definition at line 115 of file text_buffer_manager.cpp.

◆ set_text_color()

void gfx::text_buffer::set_text_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 120 of file text_buffer_manager.cpp.

◆ set_underline_color()

void gfx::text_buffer::set_underline_color ( uint32_t rgba = 0xff000000)
inline

Definition at line 140 of file text_buffer_manager.cpp.


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