[−][src]Struct quicksilver::graphics::Image
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]
path: P
) -> impl Future<Item = Image, Error = QuicksilverError>
Start loading a texture from a given path
pub fn from_raw(
data: &[u8],
width: u32,
height: u32,
format: PixelFormat
) -> Result<Image>
[src]
data: &[u8],
width: u32,
height: u32,
format: PixelFormat
) -> Result<Image>
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]
fn clone(&self) -> Image
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> From<&'a Image> for Background<'a>
[src]
impl Debug for Image
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> Erased 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]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Downcast for T where
T: Any,
T: Any,