pub struct AssetScope { /* private fields */ }Expand description
An Image or an Icon and its builder.
Implementations§
Source§impl AssetScope
impl AssetScope
Sourcepub fn color(self, paint: Paint) -> Self
pub fn color(self, paint: Paint) -> Self
The tint. An icon only; an image ignores it, as the rsx widget has no such property.
Sourcepub fn content_scale(self, scale: ContentScale) -> Self
pub fn content_scale(self, scale: ContentScale) -> Self
How the picture is laid into its box. An image only; an icon takes its design system’s optical size instead.
Not calling it draws ContentScale::Fit, the whole picture in its own proportions.
ContentScale::FillBounds stretches it to the box, as CSS object-fit: fill does.
Trait Implementations§
Source§impl Drop for AssetScope
impl Drop for AssetScope
Auto Trait Implementations§
impl Forget for AssetScope
impl Freeze for AssetScope
impl Move for AssetScope
impl RefUnwindSafe for AssetScope
impl Send for AssetScope
impl Sync for AssetScope
impl Unpin for AssetScope
impl UnsafeUnpin for AssetScope
impl UnwindSafe for AssetScope
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