|
SDLPainter 0.1.0
QPainter benzeri SDL3 + OpenGL/Vulkan 2D çizim kütüphanesi
|
Font sarmalayıcı — SDL_ttf üzerinden (Phase 4). Ayrıntılar...
#include <font.h>
Public Üye Fonksiyonlar | |
| Font (const std::string &file_path, int32_t point_size) | |
| TTF dosyasından font yükle. | |
| bool | IsValid () const noexcept |
| Font başarıyla yüklendi mi? | |
| int32_t | PointSize () const noexcept |
| Punto boyutunu döndür. | |
| int32_t | Ascent () const |
| Font ascent (baseline'dan yukariya olan maksimum piksel) degerini dondur. | |
| void * | Handle () const noexcept |
| SDL_ttf font handle'ı döndür (opak pointer). | |
| bool | MeasureText (const std::string &text, int32_t &out_width, int32_t &out_height) const |
| Verilen metnin piksel boyutunu ölç. | |
| const Glyph * | GetGlyph (IRenderer &renderer, char32_t codepoint) const |
| Karakter için Glyph al; yoksa oluşturur. | |
Font sarmalayıcı — SDL_ttf üzerinden (Phase 4).
Phase 4'e kadar bu sınıf yalnızca bir stub'dır.
| sdl_painter::Font::Font | ( | const std::string & | file_path, |
| int32_t | point_size ) |
TTF dosyasından font yükle.
| file_path | Font dosyasının yolu. |
| point_size | Punto boyutu. |
| bool sdl_painter::Font::MeasureText | ( | const std::string & | text, |
| int32_t & | out_width, | ||
| int32_t & | out_height ) const |
Verilen metnin piksel boyutunu ölç.
| text | Ölçülecek metin. |
| out_width | Çıkış: genişlik (piksel). |
| out_height | Çıkış: yükseklik (piksel). |