[][src]Struct quicksilver::graphics::Image

pub struct Image { /* fields omitted */ }

An image that can be drawn to the screen

Methods

impl Image[src]

pub fn load<P: AsRef<Path>>(
    path: P
) -> impl Future<Item = Image, Error = QuicksilverError>
[src]

Start loading a texture from a given path

pub fn from_raw(
    data: &[u8],
    width: u32,
    height: u32,
    format: PixelFormat
) -> Result<Image>
[src]

Load an image from pixel values in a byte array

pub fn from_bytes(raw: &[u8]) -> Result<Image>[src]

Load an image directly from an encoded byte array

pub fn area(&self) -> Rectangle[src]

The area of the source image this subimage takes up

pub fn subimage(&self, rect: Rectangle) -> Image[src]

Find a subimage of a larger image

pub fn projection(&self, region: Rectangle) -> Transform[src]

Create a projection matrix for a given region onto the Image

Trait Implementations

impl Clone for Image[src]

impl<'a> From<&'a Image> for Background<'a>[src]

impl Debug for Image[src]

Auto Trait Implementations

impl !Send for Image

impl Unpin for Image

impl !Sync for Image

impl UnwindSafe for Image

impl !RefUnwindSafe for Image

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Downcast for T where
    T: Any