pub struct Image<H = Handle> {
    pub handle: H,
    pub filter_method: FilterMethod,
    pub rotation: Radians,
    pub border_radius: Radius,
    pub opacity: f32,
    pub snap: bool,
}Expand description
A raster image that can be drawn.
Fields§
§handle: HThe handle of the image.
filter_method: FilterMethodThe filter method of the image.
rotation: RadiansThe rotation to be applied to the image; on its center.
border_radius: RadiusThe border radius of the Image.
Currently, this will only be applied to the clip_bounds.
opacity: f32The opacity of the image.
0 means transparent. 1 means opaque.
snap: boolIf set to true, the image will be snapped to the pixel grid.
This can avoid graphical glitches, specially when using
FilterMethod::Nearest.
Implementations§
Source§impl Image<Handle>
 
impl Image<Handle>
Sourcepub fn filter_method(self, filter_method: FilterMethod) -> Self
 
pub fn filter_method(self, filter_method: FilterMethod) -> Self
Sets the filter method of the Image.
Trait Implementations§
impl<H> StructuralPartialEq for Image<H>
Auto Trait Implementations§
impl<H> Freeze for Image<H>where
    H: Freeze,
impl<H> RefUnwindSafe for Image<H>where
    H: RefUnwindSafe,
impl<H> Send for Image<H>where
    H: Send,
impl<H> Sync for Image<H>where
    H: Sync,
impl<H> Unpin for Image<H>where
    H: Unpin,
impl<H> UnwindSafe for Image<H>where
    H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more