HikoGUI
Select Version: ⚠️ This documents the main development branch of HikoGUI. It might differ from release versions.
A low latency retained GUI
|
Public Types | |
using | iterator = std::vector<text_shaper_char>::iterator |
using | const_iterator = std::vector<text_shaper_char>::const_iterator |
using | column_vector = std::vector<iterator> |
Public Member Functions | |
text_shaper_line (size_t line_nr, const_iterator begin, iterator first, iterator last, float width, font_metrics_px const &metrics) noexcept | |
Construct a line. | |
constexpr size_t | size () const noexcept |
constexpr iterator | front () const noexcept |
constexpr iterator | back () const noexcept |
iterator | operator[] (size_t index) const noexcept |
void | layout (horizontal_alignment alignment, float min_x, float max_x, float sub_pixel_width) noexcept |
std::pair< const_iterator, bool > | get_nearest (point2 position) const noexcept |
Get the character nearest to position. | |
Data Fields | |
iterator | first |
The first character in the line, in logical order. | |
iterator | last |
One beyond the last character in the line, in logical order. | |
column_vector | columns |
Iterators to the characters in the text. | |
font_metrics_px | metrics |
The maximum metrics of the font of each glyph on this line. | |
size_t | line_nr |
The line number of this line, counted from top to bottom. | |
float | y |
Position of the base-line of this line. | |
aarectangle | rectangle |
The rectangle of the line. | |
float | width |
The width of this line, excluding trailing white space, glyph morphing and kerning. | |
unicode_general_category | last_category |
Category of the last character on the line. | |
unicode_bidi_class | paragraph_direction |
The writing direction of the paragraph. | |
|
inlinenoexcept |
Construct a line.
line_nr | The line number counting from top to bottom. |
begin | The first character of the text. |
first | The first character of the line. |
last | One beyond the last character of the line. |
width | The width of the line. |
metrics | The initial line metrics. |
|
inlinenoexcept |
Get the character nearest to position.
column_vector v1::text_shaper_line::columns |
Iterators to the characters in the text.
The Iterators are in display-order.
iterator v1::text_shaper_line::first |
The first character in the line, in logical order.
iterator v1::text_shaper_line::last |
One beyond the last character in the line, in logical order.
unicode_general_category v1::text_shaper_line::last_category |
Category of the last character on the line.
Use to determine if this line ends in:
size_t v1::text_shaper_line::line_nr |
The line number of this line, counted from top to bottom.
font_metrics_px v1::text_shaper_line::metrics |
The maximum metrics of the font of each glyph on this line.
unicode_bidi_class v1::text_shaper_line::paragraph_direction |
The writing direction of the paragraph.
This value will be set the same on each line of a paragraph.
aarectangle v1::text_shaper_line::rectangle |
The rectangle of the line.
The attributes of the rectangle are:
float v1::text_shaper_line::width |
The width of this line, excluding trailing white space, glyph morphing and kerning.
float v1::text_shaper_line::y |
Position of the base-line of this line.