pub struct Image<H = Handle> {
pub handle: H,
pub filter_method: FilterMethod,
pub rotation: Radians,
pub opacity: f32,
pub snap: bool,
}
Expand description
A raster image that can be drawn.
Fields§
§handle: H
The handle of the image.
filter_method: FilterMethod
The filter method of the image.
rotation: Radians
The rotation to be applied to the image; on its center.
opacity: f32
The opacity of the image.
0 means transparent. 1 means opaque.
snap: bool
If 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