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.
Source§impl AssetScope
impl AssetScope
Source§impl AssetScope
impl AssetScope
Sourcepub fn on_motion_finished(
self,
handler: impl FnMut(MotionFinished) + 'static,
) -> Self
pub fn on_motion_finished( self, handler: impl FnMut(MotionFinished) + 'static, ) -> Self
Runs once when this node’s size motion comes to rest, with the size it settled
at in dp. The node needs Modifier::motion for its size to move; without it
nothing is reported. A run interrupted by a newer size is not reported, only
the one that settles, and under reduced motion it arrives in the frame the
size changes in.
Trait Implementations§
Source§impl Drop for AssetScope
impl Drop for AssetScope
Auto Trait Implementations§
impl !RefUnwindSafe for AssetScope
impl !Send for AssetScope
impl !Sync for AssetScope
impl !UnwindSafe for AssetScope
impl Forget for AssetScope
impl Freeze for AssetScope
impl Move for AssetScope
impl Unpin for AssetScope
impl UnsafeUnpin 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