Struct Svg
pub struct Svg<H = Handle> {
pub handle: H,
pub color: Option<Color>,
pub rotation: Radians,
pub opacity: f32,
}Available on crate feature
geometry only.Expand description
A raster image that can be drawn.
Fields§
§handle: HThe handle of the Svg.
color: Option<Color>The [Color] filter to be applied to the Svg.
If some [Color] is set, the whole Svg will be
painted with it—ignoring any intrinsic colors.
This can be useful for coloring icons programmatically (e.g. with a theme).
rotation: RadiansThe rotation to be applied to the image; on its center.
opacity: f32The opacity of the Svg.
0 means transparent. 1 means opaque.
Implementations§
Trait Implementations§
impl<H> StructuralPartialEq for Svg<H>
Auto Trait Implementations§
impl<H> Freeze for Svg<H>where
H: Freeze,
impl<H> RefUnwindSafe for Svg<H>where
H: RefUnwindSafe,
impl<H> Send for Svg<H>where
H: Send,
impl<H> Sync for Svg<H>where
H: Sync,
impl<H> Unpin for Svg<H>where
H: Unpin,
impl<H> UnwindSafe for Svg<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more