Struct Image
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,
}Available on crate feature
geometry only.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§
§impl Image
impl Image
pub fn filter_method(self, filter_method: FilterMethod) -> Image
pub fn filter_method(self, filter_method: FilterMethod) -> Image
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more