Trait rich_sdl2_ttf_rust::font::RenderExt [−][src]
pub trait RenderExt { fn render(&self, text: &str, mode: RenderMode) -> Result<TtfSurface>; fn render_wrapped(
&self,
text: &str,
wrap_length: u32,
mode: RenderMode
) -> Result<TtfSurface>; fn render_glyph(&self, ch: char, mode: RenderMode) -> Result<TtfSurface>; }
Expand description
An extension for rendering the text.
Required methods
fn render(&self, text: &str, mode: RenderMode) -> Result<TtfSurface>
fn render(&self, text: &str, mode: RenderMode) -> Result<TtfSurface>
Renders the text into the TtfSurface
, or Err
on failure.
fn render_wrapped(
&self,
text: &str,
wrap_length: u32,
mode: RenderMode
) -> Result<TtfSurface>
fn render_wrapped(
&self,
text: &str,
wrap_length: u32,
mode: RenderMode
) -> Result<TtfSurface>
Renders the wrapped text into the TtfSurface
, or Err
on failure.
fn render_glyph(&self, ch: char, mode: RenderMode) -> Result<TtfSurface>
fn render_glyph(&self, ch: char, mode: RenderMode) -> Result<TtfSurface>
Renders the character into the TtfSurface
, or Err
on failure.