Struct nannou::ui::widget::button::Image [−][src]
pub struct Image { pub image_id: Id, pub hover_image_id: Option<Id>, pub press_image_id: Option<Id>, pub color: ImageColor, pub src_rect: Option<Rect>, }
Expand description
The Button
displays an Image
on top.
Fields
image_id: Id
The id of the Image
to be used.
hover_image_id: Option<Id>
The image displayed when the mouse hovers over the button.
press_image_id: Option<Id>
The image displayed when the mouse has captured and is pressing the button.
color: ImageColor
If Some
, maps the image’s luminance to this Color
.
src_rect: Option<Rect>
The rectangular area of the original source image that should be displayed.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Image
impl UnwindSafe for Image
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more
pub fn vzip(self) -> V