[−][src]Module cat_engine::text
Рендеринг текста. Text rendering. feature = "text_graphics"
, default_features
Как рендерится символ:
- С помощью библиотеки
rusttype
создаётся символ (или уже даётся готовый) - Этот символ записывается в массив как изображение
- Изображение загружается в текстуру
- Текстура выводится на экран
How a sign is rendering:
- A glyph is built with the
rusttype
crate (or is given the ready one) - The glyph is written to the array as an image
- The image is loaded to the texture
- The texture is rendered
Re-exports
pub use rusttype; |
Structs
TextBase | Основа для рендеринга текста. A base for text rendering. |
Functions
char_height | Возвращает высоту символа. Returns the height of the character. |
char_size | Возвращает размер символа. Returns the size of the character. |
char_width | Возвращает ширину символа. Returns the width of the character. |
load_font | Загружает шрифт. Loads a font. |
text_height | Расчитывает высоту текста. Calculates the height of the text. |
text_size | Расчитывает и возвращает ширину и высоту текста. Calculates and returns the width and the height of the text. |
text_width | Расчитывает ширину текста. Calculates the text width. |