[][src]Enum quicksilver::graphics::Background

pub enum Background<'a> {
    Col(Color),
    Img(&'a Image),
    Blended(&'a ImageColor),
}

The background to use for a given drawable

While each Drawable can define its own behavior, the recommended behavior is that the Image be applied in proportion to the relative position of the vertices. This means the left-most vertex should use the left edge of the image, the right-most vertex should use the right edge of the image, etc.

Variants

Col(Color)

A uniform color background

Img(&'a Image)

A textured background

Blended(&'a ImageColor)

A color and image blended multiplicatively

Methods

impl<'a> Background<'a>[src]

pub fn image(&self) -> Option<&Image>[src]

Return either the stored Image or None

pub fn color(&self) -> Color[src]

Return either the stored Color or Color::WHITE

Trait Implementations

impl<'a> Copy for Background<'a>[src]

impl<'a> Clone for Background<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a> !Send for Background<'a>

impl<'a> !Sync for Background<'a>

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self

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

impl<T> Downcast for T where
    T: Any