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

pub enum Background<'a> {
    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.



A uniform color background

Img(&'a Image)

A textured background

Blended(&'a ImageColor)

A color and image blended multiplicatively


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> Clone for Background<'a>[src]

impl<'a> From<Color> for Background<'a>[src]

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

impl<'a> From<(&'a Image, Color)> for Background<'a>[src]

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

Auto Trait Implementations

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

impl<'a> Unpin for Background<'a>

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

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

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

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> Borrow<T> for T where
    T: ?Sized

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

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>, 

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

impl<T> Downcast for T where
    T: Any

impl<T> Slottable for T where
    T: Copy