pub struct ImageDrawParams {
pub rect: Rect,
pub local_rect: Rect,
pub quad: [[f32; 2]; 4],
pub image: ImageBitmap,
pub alpha: f32,
pub color_filter: Option<ColorFilter>,
pub sampling: ImageSampling,
pub clip: Option<Rect>,
pub src_rect: Option<Rect>,
pub blend_mode: BlendMode,
pub motion_context_animated: bool,
}Expand description
An image ready for a renderer to draw, with the layer transform, opacity and clip resolved.
Fields§
§rect: RectAxis-aligned bounds of quad.
local_rect: RectThe image’s rectangle after the layer’s scale and translation, before any rotation.
quad: [[f32; 2]; 4]The image’s rectangle after the full layer transform, as four corners.
image: ImageBitmapThe bitmap to draw.
alpha: f32Opacity of the image from 0.0 to 1.0.
color_filter: Option<ColorFilter>Color filter applied to the image, if any.
sampling: ImageSamplingHow the bitmap is sampled when it is scaled.
clip: Option<Rect>Clip rectangle that cuts the image, or None when nothing clips it.
src_rect: Option<Rect>Region of the bitmap to draw, in bitmap pixels, or None for the whole bitmap.
blend_mode: BlendModeHow the image blends onto what lies beneath it.
motion_context_animated: boolWhether the image sits in an animated motion context, where a renderer must not snap it to the pixel grid.
Auto Trait Implementations§
impl Freeze for ImageDrawParams
impl RefUnwindSafe for ImageDrawParams
impl Send for ImageDrawParams
impl Sync for ImageDrawParams
impl Unpin for ImageDrawParams
impl UnsafeUnpin for ImageDrawParams
impl UnwindSafe for ImageDrawParams
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