pub enum ShapeKind {
Rect,
Circle,
Ellipse,
RoundedRect {
corner_radius: f32,
},
UnevenRoundedRect {
top_left: f32,
top_right: f32,
bottom_left: f32,
bottom_right: f32,
},
Capsule,
FixedRoundedRect {
corner_radius: f32,
},
FixedUnevenRoundedRect {
top_left: f32,
top_right: f32,
bottom_left: f32,
bottom_right: f32,
},
CustomPath,
}Expand description
The kind of shape for backend rendering optimization.
Variants§
Rect
Rectangle with sharp corners.
Circle
Circle inscribed in bounds.
Ellipse
Ellipse filling bounds.
RoundedRect
Rectangle with uniform corner radius.
UnevenRoundedRect
Rectangle with per-corner radii.
Fields
Capsule
Capsule (pill) shape.
FixedRoundedRect
Rectangle with a uniform corner radius in logical points.
Unlike ShapeKind::RoundedRect, the radius is an absolute length, not
a fraction of the shorter side: a corner_radius of 28.0 is 28 points
whether the bounds are 280x140 or 560x300. Backends clamp it to half the
shorter side at resolve time.
FixedUnevenRoundedRect
Rectangle with per-corner radii in logical points.
Same absolute semantics as ShapeKind::FixedRoundedRect, with each
corner named independently.
Fields
CustomPath
Custom path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShapeKind
impl RefUnwindSafe for ShapeKind
impl Send for ShapeKind
impl Sync for ShapeKind
impl Unpin for ShapeKind
impl UnsafeUnpin for ShapeKind
impl UnwindSafe for ShapeKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> IdentifiableExt for T
impl<T> IdentifiableExt for T
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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