|
Nana C++ Library. Reference for users.
What we need to use nana
|
Draw aligned string. More...
Public Types | |
| using | graph_reference = graphics & |
Public Member Functions | |
| aligner (graph_reference graph, align text_align=align::left) | |
| Constructor. More... | |
| aligner (graph_reference graph, align text_align, align text_align_if_too_long) | |
| void | draw (const std::string &text, point pos, unsigned width) |
| Draws a text with specified text alignment. More... | |
| void | draw (const std::wstring &text, point pos, unsigned width) |
Draw aligned string.
| nana::paint::aligner::aligner | ( | graph_reference | graph, |
| align | text_align = align::left |
||
| ) |
Constructor.
| graph | Reference to a graphics object |
| text_align | Alignment of text |
| text_align_if_too_long | Alignment of text if the pixels of string is larger than text area |
| nana::paint::aligner::aligner | ( | graph_reference | graph, |
| align | text_align, | ||
| align | text_align_if_too_long | ||
| ) |
| void nana::paint::aligner::draw | ( | const std::string & | text, |
| point | pos, | ||
| unsigned | width | ||
| ) |
Draws a text with specified text alignment.
| text | Text to draw |
| pos | Postion where the text to draw |
| width | The width of text area. If the pixels of text is larger than this parameter, it draws ellipsis |
| void nana::paint::aligner::draw | ( | const std::wstring & | text, |
| point | pos, | ||
| unsigned | width | ||
| ) |