SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SDL::TextEngineBase Struct Reference

A text engine used to create text objects. More...

Inheritance diagram for SDL::TextEngineBase:
Inheritance graph
[legend]

Public Member Functions

constexpr TextEngineBase (TTF_TextEngine *engine, void(*destroy)(TTF_TextEngine *engine))
 Create from engine and custom destroyer.
 
void SetGPUWinding (GPUTextEngineWinding winding)
 Sets the winding order of the vertices returned by TextBase.GetGPUDrawData for a particular GPU text engine.
 
GPUTextEngineWinding GetGPUWinding () const
 Get the winding order of the vertices returned by TextBase.GetGPUDrawData for a particular GPU text engine.
 
constexpr Resource (T resource={})
 Constructs the underlying resource.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
 Resource (const Resource &other)=delete
 
 Resource (Resource &&other)=delete
 
- Public Member Functions inherited from SDL::Resource< TTF_TextEngine * >
constexpr Resource (TTF_TextEngine * resource={})
 Constructs the underlying resource.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
 Resource (const Resource &other)=delete
 
 Resource (Resource &&other)=delete
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (Resource &&other)=delete
 
constexpr operator bool () const
 True if contains a valid resource.
 
constexpr bool operator== (const Resource &other) const=default
 Comparison.
 
constexpr bool operator== (std::nullopt_t) const
 Comparison.
 
constexpr bool operator== (std::nullptr_t) const
 Comparison.
 
constexpr TTF_TextEngine * get () const
 Return contained resource;.
 
constexpr TTF_TextEngine * release (TTF_TextEngine * newResource={})
 Return contained resource and empties or replace value.
 
constexpr const TTF_TextEngine * operator-> () const
 Access to fields.
 
constexpr TTF_TextEngine * operator-> ()
 Access to fields.
 

Protected Attributes

void(* m_destroy )(TTF_TextEngine *engine) = nullptr
 Custom destroyer.
 

Detailed Description

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:

Since
This struct is available since SDL_ttf 3.0.0.
Category:
Resource
See also
TextEngine
TextEngineRef

Member Function Documentation

◆ GetGPUWinding()

GPUTextEngineWinding SDL::TextEngineBase::GetGPUWinding ( ) const
inline
Returns
the winding order used by the GPU text engine or GPU_TEXTENGINE_WINDING_INVALID in case of error.
Thread safety:
This function should be called on the thread that created the engine.
Since
This function is available since SDL_ttf 3.0.0.
See also
TextEngineBase.SetGPUWinding

◆ SetGPUWinding()

void SDL::TextEngineBase::SetGPUWinding ( GPUTextEngineWinding  winding)
inline
Parameters
windingthe new winding order option.
Thread safety:
This function should be called on the thread that created the engine.
Since
This function is available since SDL_ttf 3.0.0.
See also
TextEngineBase.GetGPUWinding

The documentation for this struct was generated from the following file: