TTF_CopyOperation

Struct TTF_CopyOperation 

Source
#[repr(C)]
pub struct TTF_CopyOperation { pub cmd: TTF_DrawCommand, pub text_offset: c_int, pub glyph_font: *mut TTF_Font, pub glyph_index: Uint32, pub src: SDL_Rect, pub dst: SDL_Rect, pub reserved: *mut c_void, }
Expand description

A texture copy draw operation.

§Availability

This struct is available since SDL_ttf 3.0.0.

§See also

Fields§

§cmd: TTF_DrawCommand§text_offset: c_int

The offset in the text corresponding to this glyph. There may be multiple glyphs with the same text offset and the next text offset might be several Unicode codepoints later. In this case the glyphs and codepoints are grouped together and the group bounding box is the union of the dst rectangles for the corresponding glyphs.

§glyph_font: *mut TTF_Font

The font containing the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex()

§glyph_index: Uint32

The glyph index of the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex()

§src: SDL_Rect

The area within the glyph to be drawn

§dst: SDL_Rect

The drawing coordinates of the glyph, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down.

§reserved: *mut c_void

Trait Implementations§

Source§

impl Clone for TTF_CopyOperation

Source§

fn clone(&self) -> TTF_CopyOperation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for TTF_CopyOperation

Source§

fn default() -> Self

Initialize all fields to zero

Source§

impl Copy for TTF_CopyOperation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.