[][src]Struct sdl2::ttf::Sdl2TtfContext

#[must_use]pub struct Sdl2TtfContext;

A context manager for SDL2_TTF to manage C code initialization and clean-up.

Methods

impl Sdl2TtfContext[src]

pub fn load_font<'ttf, P: AsRef<Path>>(
    &'ttf self,
    path: P,
    point_size: u16
) -> Result<Font<'ttf, 'static>, String>
[src]

Loads a font from the given file with the given size in points.

pub fn load_font_at_index<'ttf, P: AsRef<Path>>(
    &'ttf self,
    path: P,
    index: u32,
    point_size: u16
) -> Result<Font<'ttf, 'static>, String>
[src]

Loads the font at the given index of the file, with the given size in points.

pub fn load_font_from_rwops<'ttf, 'r>(
    &'ttf self,
    rwops: RWops<'r>,
    point_size: u16
) -> Result<Font<'ttf, 'r>, String>
[src]

Loads a font from the given SDL2 rwops object with the given size in points.

pub fn load_font_at_index_from_rwops<'ttf, 'r>(
    &'ttf self,
    rwops: RWops<'r>,
    index: u32,
    point_size: u16
) -> Result<Font<'ttf, 'r>, String>
[src]

Loads the font at the given index of the SDL2 rwops object with the given size in points.

Trait Implementations

impl Drop for Sdl2TtfContext[src]

Auto Trait Implementations

impl RefUnwindSafe for Sdl2TtfContext

impl Send for Sdl2TtfContext

impl Sync for Sdl2TtfContext

impl Unpin for Sdl2TtfContext

impl UnwindSafe for Sdl2TtfContext

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.