pub struct ImagePaintStyle {
pub scale: f64,
pub opacity: f64,
pub fit: Option<BoxFit>,
pub alignment: Alignment,
pub repeat: ImageRepeat,
pub flip_horizontally: bool,
}Expand description
How an image is drawn into a box, beyond the image itself. Flutter’s paintImage arguments.
Fields§
§scale: f64Pixels per logical point in the image, which decides its unfitted size.
opacity: f64How opaque to draw it, from zero to one.
fit: Option<BoxFit>How to fit it to the box. None means Dart’s default of scaling down only if it
does not already fit.
alignment: AlignmentWhere it sits in the box when it does not fill it.
repeat: ImageRepeatWhat to do with the space it does not cover.
flip_horizontally: boolDraw it mirrored, which is how a directional image faces the other way in a right-to-left layout.
Trait Implementations§
Source§impl Clone for ImagePaintStyle
impl Clone for ImagePaintStyle
Source§fn clone(&self) -> ImagePaintStyle
fn clone(&self) -> ImagePaintStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImagePaintStyle
impl Debug for ImagePaintStyle
Source§impl Default for ImagePaintStyle
impl Default for ImagePaintStyle
Source§fn default() -> ImagePaintStyle
fn default() -> ImagePaintStyle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for ImagePaintStyle
impl Freeze for ImagePaintStyle
impl Move for ImagePaintStyle
impl RefUnwindSafe for ImagePaintStyle
impl Send for ImagePaintStyle
impl Sync for ImagePaintStyle
impl Unpin for ImagePaintStyle
impl UnsafeUnpin for ImagePaintStyle
impl UnwindSafe for ImagePaintStyle
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