#[repr(C)]pub struct TTF_TextEngine {
pub version: Uint32,
pub userdata: *mut c_void,
pub CreateText: Option<unsafe extern "C" fn(userdata: *mut c_void, text: *mut TTF_Text) -> bool>,
pub DestroyText: Option<unsafe extern "C" fn(userdata: *mut c_void, text: *mut TTF_Text)>,
}Expand description
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:
- Drawing to an
SDL_Surface, created withTTF_CreateSurfaceTextEngine() - Drawing with an SDL 2D renderer, created with
TTF_CreateRendererTextEngine() - Drawing with the SDL GPU API, created with
TTF_CreateGPUTextEngine()
§Availability
This struct is available since SDL_ttf 3.0.0. A text engine interface.
This structure should be initialized using SDL_INIT_INTERFACE()
§Availability
This struct is available since SDL_ttf 3.0.0.
§See also
§Notes for sdl3-sys
This interface struct can be initialized with TTF_TextEngine::new() or Default::default().
Fields§
§version: Uint32The version of this interface
userdata: *mut c_voidUser data pointer passed to callbacks
CreateText: Option<unsafe extern "C" fn(userdata: *mut c_void, text: *mut TTF_Text) -> bool>§DestroyText: Option<unsafe extern "C" fn(userdata: *mut c_void, text: *mut TTF_Text)>- Destroy a text representation.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TTF_TextEngine
impl RefUnwindSafe for TTF_TextEngine
impl !Send for TTF_TextEngine
impl !Sync for TTF_TextEngine
impl Unpin for TTF_TextEngine
impl UnwindSafe for TTF_TextEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more