|
SDL3pp
A slim C++ wrapper for SDL3
|
A text engine used to create text objects. More...
Public Member Functions | |
| constexpr | TextEngine (TextEngineRaw resource) noexcept |
| Constructs from raw TextEngine. | |
| constexpr | TextEngine (const TextEngine &other)=delete |
| Copy constructor. | |
| constexpr | TextEngine (TextEngine &&other) noexcept |
| Move constructor. | |
| virtual | ~TextEngine () |
| Destructor. | |
| constexpr TextEngine & | operator= (TextEngine &&other) noexcept |
| Assignment operator. | |
| TextEngine & | operator= (const TextEngine &other)=delete |
| Assignment operator. | |
| virtual void | Destroy ()=0 |
| frees up textEngine. Pure virtual | |
| Text | CreateText (FontRef font, std::string_view text) |
| Create a text object from UTF-8 text and a text engine. | |
| constexpr | ResourceBase (RawPointer resource) |
| Constructs from resource pointer. | |
| constexpr | ResourceBase (std::nullptr_t=nullptr) |
| Constructs null/invalid. | |
| Public Member Functions inherited from SDL::ResourceBase< TextEngineRaw > | |
| constexpr | ResourceBase (RawPointer resource) |
| Constructs from resource pointer. | |
| constexpr | operator bool () const |
| Converts to bool. | |
| constexpr auto | operator<=> (const ResourceBase &other) const=default |
| Comparison. | |
| constexpr RawConstPointer | operator-> () const noexcept |
| member access to underlying resource pointer. | |
| constexpr RawPointer | get () const noexcept |
| Retrieves underlying resource pointer. | |
| constexpr RawPointer | release () noexcept |
| Retrieves underlying resource pointer and clear this. | |
Additional Inherited Members | |
| Public Types inherited from SDL::ResourceBase< TextEngineRaw > | |
| using | RawPointer |
| The underlying raw pointer type. | |
| using | RawConstPointer |
| The underlying const raw pointer type. | |
A text engine used to create text objects.
This is a public interface that can be used by applications and libraries to perform customize rendering with text objects. See <SDL3_ttf/SDL_textengine.h> for details.
There are three text engines provided with the library:
|
inlineexplicitconstexprnoexcept |
Constructs from raw TextEngine.
| resource | a TextEngineRaw to be wrapped. |
This assumes the ownership, call release() if you need to take back.
|
pure virtual |
frees up textEngine. Pure virtual
Implemented in SDL::GPUTextEngine, SDL::RendererTextEngine, and SDL::SurfaceTextEngine.