[][src]Struct polyhorn_ui::styles::ImageStyle

pub struct ImageStyle {
    pub object_fit: ObjectFit,
    pub tint_color: Option<Color>,
}

Controls the appearance of an Image.

Fields

object_fit: ObjectFit

Controls the method for fitting images that do not match the dimensions of their container.

tint_color: Option<Color>

If present, controls the color that this image is rendered in. Only the alpha channel of the original image is kept: all other channels are replaced by the given tint color. If this tint color exists in a different color space than the original image, the resulting image is drawn using the color space of the tint color.

Trait Implementations

impl Clone for ImageStyle[src]

impl Copy for ImageStyle[src]

impl Debug for ImageStyle[src]

impl Default for ImageStyle[src]

impl From<ImageStyle> for ImageViewStyle[src]

impl PartialEq<ImageStyle> for ImageStyle[src]

impl StructuralPartialEq for ImageStyle[src]

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

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

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

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

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.