[][src]Struct pushrod::render::texture_cache::TextureCache

pub struct TextureCache { /* fields omitted */ }

This is the structure for the TextureCache.

Methods

impl TextureCache[src]

This is a Texture cache object that is used by the WidgetCache. This is responsible for loading in images into a cache in memory so that it can be copied multiple times as required by the application.

pub fn new() -> Self[src]

Creates a new TextureCache.

pub fn get_ttf_context(&self) -> &Sdl2TtfContext[src]

Retrieves the current Text Rendering context (Sdl2TtfContext)

pub fn get_image(
    &mut self,
    c: &mut Canvas<Window>,
    image_name: String
) -> &Texture
[src]

Loads an image based on the image_name, which is the filename for the image to load. Returns a reference to the Texture that was loaded.

Auto Trait Implementations

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.