mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
text-wrapping + fix
This commit is contained in:
parent
37e089169e
commit
56a8226028
9 changed files with 135 additions and 54 deletions
|
|
@ -28,9 +28,16 @@ public:
|
|||
|
||||
/// @brief Calculate text width in pixels
|
||||
/// @param text selected text
|
||||
/// @param length max text chunk length (default: no limit)
|
||||
/// @return pixel width of the text
|
||||
int calcWidth(std::wstring text, size_t length=-1);
|
||||
/// @param length max substring length (default: no limit)
|
||||
/// @return pixel width of the substring
|
||||
int calcWidth(const std::wstring& text, size_t length=-1);
|
||||
|
||||
/// @brief Calculate text width in pixels
|
||||
/// @param text selected text
|
||||
/// @param offset start of the substring
|
||||
/// @param length max substring length
|
||||
/// @return pixel width of the substring
|
||||
int calcWidth(const std::wstring& text, size_t offset, size_t length);
|
||||
|
||||
/// @brief Check if character is visible (non-whitespace)
|
||||
/// @param codepoint character unicode codepoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue