|
FlatUI
An open source project by
FPL.
|
this is used with the texture atlas rendering. More...
#include <font_buffer.h>
this is used with the texture atlas rendering.
Public Types | |
|
typedef std::map < FontBufferParameters, std::unique_ptr< FontBuffer > , FontBufferParameters > ::iterator | fontbuffer_map_it |
Public Member Functions | |
| FontBuffer () | |
| The default constructor for a FontBuffer. | |
| FontBuffer (uint32_t size, bool caret_info) | |
| The constructor for FontBuffer with a given buffer size. More... | |
| ~FontBuffer () | |
| The destructor for FontBuffer. | |
| const FontMetrics & | metrics () const |
| const std::vector < FontBufferAttributes > & | get_slices () const |
| const std::vector< uint16_t > & | get_indices (int32_t index) const |
| const std::vector< FontVertex > & | get_vertices () const |
| std::vector< FontVertex > & | get_vertices () |
| const std::vector< GlyphInfo > & | get_glyph_info () const |
| const mathfu::vec2i | get_size () const |
| int32_t | get_revision () const |
| int32_t | get_pass () const |
| bool | Verify () const |
| Verifies that the sizes of the arrays used in the buffer are correct. More... | |
| mathfu::vec2i | GetCaretPosition (size_t index) const |
| Retrieve a caret positions with a given index. More... | |
| const std::vector < mathfu::vec2i > & | GetCaretPositions () const |
| bool | HasCaretPositions () const |
| bool | HasEllipsis () const |
| std::vector< mathfu::vec4 > | CalculateBounds (int32_t start_index, int32_t end_index) const |
| Helper to retrieve AABB info for glyph index range. Note that we return multiple AABB bounds if the glyphs span multiple lines. Each vec4 is in the format (min_x, min_y, max_x, max_y). | |
| const std::vector< LinkInfo > & | get_links () const |
| Return glyph indices and linked-to address of any HREF links that have been rendered to this FontBuffer. | |
| int32_t | get_glyph_count () const |
| Return current glyph count stored in the buffer. | |
| uint32_t | get_ref_count () const |
| Gets the reference count of the buffer. | |
Static Public Attributes | |
| static const int32_t | kIndiciesPerCodePoint = 6 |
| The number of indices per code point. | |
| static const int32_t | kVerticesPerCodePoint = 4 |
| The number of vertices per code point. | |
|
inline |
The constructor for FontBuffer with a given buffer size.
| [in] | size | A size of the FontBuffer in a number of glyphs. |
| [in] | caret_info | Indicates if the FontBuffer also maintains a caret position buffer. |
Since it has a strong relationship to rendering positions, we store the caret position information in the FontBuffer.
|
inline |
|
inline |
|
inline |
StartRenderPass() to upload the atlas texture.
|
inline |
If the cache revision and the buffer revision is different, the font_manager try to re-construct the buffer.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieve a caret positions with a given index.
| [in] | index | The index of the caret position. |
kCaretPositionInvalid if the buffer does not contain caret information at the given index, or if the index is out of range.
|
inline |
|
inline |
true if the FontBuffer contains any caret positions. If the caret positions array has 0 elements, it will return false.
|
inline |
true if the FontBuffer has an ellipsis appended.
|
inline |
|
inline |
Verifies that the sizes of the arrays used in the buffer are correct.
true.