pub enum ShapeKind {
Rectangle,
RoundedRectangle {
corner: Corner,
},
Circle,
Ellipse,
Capsule,
Arc {
start_deg: f64,
sweep_deg: f64,
},
Line {
from: UnitPoint,
to: UnitPoint,
},
Polygon {
points: Rc<[UnitPoint]>,
},
}Expand description
A shape’s geometry, resolved against the rect layout assigns it (frame-relative, SwiftUI-style).
Variants§
Rectangle
RoundedRectangle
Circle
Ellipse
Capsule
Arc
A stroked arc of the inscribed ellipse; degrees, 0 = +x, clockwise.
Line
A stroked segment between two unit points of the resolved rect (stroke-only; fills are ignored). Unit points resolve unclamped, like every unit-space resolve.
Polygon
A filled/stroked polygon of unit points resolved against the rect (unclamped — points may deliberately sit outside 0..1).
Trait Implementations§
impl StructuralPartialEq for ShapeKind
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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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