Unravel Engine C++ Reference
|
#include <text_buffer_manager.h>
Public Member Functions | |
text_buffer_manager (font_manager *font_manager) | |
~text_buffer_manager () | |
auto | create_text_buffer (uint32_t type, buffer_type::Enum btype) -> text_buffer_handle |
void | destroy_text_buffer (text_buffer_handle handle) |
void | submit_text_buffer (text_buffer_handle handle, font_handle fhandle, bgfx::ViewId id, uint64_t state=0, int32_t depth=0) |
void | set_style (text_buffer_handle handle, uint32_t flags=style_normal) |
void | set_text_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_background_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_foreground_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_overline_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_underline_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_strike_through_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_outline_width (text_buffer_handle handle, float outline_width=3.0f) |
void | set_outline_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_drop_shadow_offset (text_buffer_handle handle, float u, float v) |
void | set_drop_shadow_color (text_buffer_handle handle, uint32_t rgba=0x000000FF) |
void | set_drop_shadow_softener (text_buffer_handle handle, float smoother=1.0f) |
void | set_pen_origin (text_buffer_handle handle, float x, float y) |
void | set_pen_position (text_buffer_handle handle, float x, float y) |
void | get_pen_position (text_buffer_handle handle, float *x, float *y) |
void | set_apply_kerning (text_buffer_handle handle, bool apply_kerning) |
void | append_text (text_buffer_handle handle, font_handle fhandle, const char *string, const char *end=nullptr) |
Append an ASCII/utf-8 string to the buffer using current pen position and color. | |
void | append_text (text_buffer_handle handle, font_handle fhandle, const wchar_t *string, const wchar_t *end=nullptr) |
Append a wide char unicode string to the buffer using current pen position and color. | |
void | append_atlas_face (text_buffer_handle handle, font_handle fhandle, uint16_t face_index) |
Append a whole face of the atlas cube, mostly used for debugging and visualizing atlas. | |
void | clear_text_buffer (text_buffer_handle handle) |
Clear the text buffer and reset its state (pen/color). | |
auto | get_rectangle (text_buffer_handle handle) const -> text_rectangle |
Return the rectangular size of the current text buffer (including all its content). | |
Definition at line 45 of file text_buffer_manager.h.
gfx::text_buffer_manager::text_buffer_manager | ( | font_manager * | font_manager | ) |
Definition at line 866 of file text_buffer_manager.cpp.
gfx::text_buffer_manager::~text_buffer_manager | ( | ) |
Definition at line 923 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::append_atlas_face | ( | text_buffer_handle | handle, |
font_handle | fhandle, | ||
uint16_t | face_index ) |
Append a whole face of the atlas cube, mostly used for debugging and visualizing atlas.
Definition at line 1357 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::append_text | ( | text_buffer_handle | handle, |
font_handle | fhandle, | ||
const char * | string, | ||
const char * | end = nullptr ) |
Append an ASCII/utf-8 string to the buffer using current pen position and color.
Definition at line 1337 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::append_text | ( | text_buffer_handle | handle, |
font_handle | fhandle, | ||
const wchar_t * | string, | ||
const wchar_t * | end = nullptr ) |
Append a wide char unicode string to the buffer using current pen position and color.
Definition at line 1347 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::clear_text_buffer | ( | text_buffer_handle | handle | ) |
Clear the text buffer and reset its state (pen/color).
Definition at line 1364 of file text_buffer_manager.cpp.
auto gfx::text_buffer_manager::create_text_buffer | ( | uint32_t | type, |
buffer_type::Enum | btype ) -> text_buffer_handle |
Definition at line 944 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::destroy_text_buffer | ( | text_buffer_handle | handle | ) |
Definition at line 959 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::get_pen_position | ( | text_buffer_handle | handle, |
float * | x, | ||
float * | y ) |
Definition at line 1323 of file text_buffer_manager.cpp.
auto gfx::text_buffer_manager::get_rectangle | ( | text_buffer_handle | handle | ) | const -> text_rectangle |
Return the rectangular size of the current text buffer (including all its content).
Definition at line 1371 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_apply_kerning | ( | text_buffer_handle | handle, |
bool | apply_kerning ) |
Definition at line 1330 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_background_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1239 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_drop_shadow_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1288 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_drop_shadow_offset | ( | text_buffer_handle | handle, |
float | u, | ||
float | v ) |
Definition at line 1295 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_drop_shadow_softener | ( | text_buffer_handle | handle, |
float | smoother = 1.0f ) |
Definition at line 1302 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_foreground_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1246 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_outline_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1274 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_outline_width | ( | text_buffer_handle | handle, |
float | outline_width = 3.0f ) |
Definition at line 1281 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_overline_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1253 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_pen_origin | ( | text_buffer_handle | handle, |
float | x, | ||
float | y ) |
Definition at line 1316 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_pen_position | ( | text_buffer_handle | handle, |
float | x, | ||
float | y ) |
Definition at line 1309 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_strike_through_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1267 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_style | ( | text_buffer_handle | handle, |
uint32_t | flags = style_normal ) |
Definition at line 1225 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_text_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1232 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::set_underline_color | ( | text_buffer_handle | handle, |
uint32_t | rgba = 0x000000FF ) |
Definition at line 1260 of file text_buffer_manager.cpp.
void gfx::text_buffer_manager::submit_text_buffer | ( | text_buffer_handle | handle, |
font_handle | fhandle, | ||
bgfx::ViewId | id, | ||
uint64_t | state = 0, | ||
int32_t | depth = 0 ) |
Definition at line 1002 of file text_buffer_manager.cpp.