[−][src]Struct sdl2::ttf::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]
&'ttf self,
path: P,
point_size: u16
) -> Result<Font<'ttf, 'static>, String>
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]
&'ttf self,
path: P,
index: u32,
point_size: u16
) -> Result<Font<'ttf, 'static>, String>
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]
&'ttf self,
rwops: RWops<'r>,
point_size: u16
) -> Result<Font<'ttf, 'r>, String>
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]
&'ttf self,
rwops: RWops<'r>,
index: u32,
point_size: u16
) -> Result<Font<'ttf, 'r>, String>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,