Struct sdl2_ttf::Sdl2TtfContext [] [src]

#[must_use]
pub struct Sdl2TtfContext;

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

Methods

impl Sdl2TtfContext
[src]

fn load_font(&self, path: &Path, point_size: u16) -> SdlResult<Font>

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

fn load_font_at_index(&self, path: &Path, index: u32, point_size: u16) -> SdlResult<Font>

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

fn load_font_from_rwops(&self, rwops: RWops, point_size: u16) -> SdlResult<Font>

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

fn load_font_at_index_from_rwops(&self, rwops: RWops, index: u32, point_size: u16) -> SdlResult<Font>

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]

fn drop(&mut self)

A method called when the value goes out of scope. Read more