Skip to main content

Images

Trait Images 

Source
pub trait Images {
    // Required method
    fn image(&self, id: ImageId) -> Option<Image<'_>>;
}
Expand description

Where the renderer finds a sprite’s one-bit picture.

Required Methods§

Source

fn image(&self, id: ImageId) -> Option<Image<'_>>

The picture of id, or None if there is none (the sprite is drawn as a grey rectangle).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Images for ()

No pictures at all.

Source§

fn image(&self, _: ImageId) -> Option<Image<'_>>

Source§

impl Images for Bundle

The pictures of a one-bit target’s pack (shuyi bake --target playdate): the one-bit picture file at each image’s path, its first style, read where it lies. A PNG, or no file, is no picture.

Source§

fn image(&self, id: ImageId) -> Option<Image<'_>>

Source§

impl<T: Images + ?Sized> Images for &T

The pictures behind a borrow are the same pictures: a &dyn Images draws as any other.

Source§

fn image(&self, id: ImageId) -> Option<Image<'_>>

Implementors§