pub enum HandDrawShape {
Line {
a: (f64, f64),
b: (f64, f64),
},
Circle {
center: (f64, f64),
rim: (f64, f64),
},
Arc {
center: (f64, f64),
start: (f64, f64),
end: (f64, f64),
},
Bezier {
controls: [(f64, f64); 4],
},
}Expand description
A recognized handdraw shape, in plane (u, v) coordinates. Point semantics match
the solver’s geometry (line = [a, b], circle = [center, rim],
arc = [center, start, end], bezier = [p0, c1, c2, p1]).
Variants§
Line
A straight segment through the stroke’s two endpoints.
Circle
A closed circle — the fitted center + a rim point on +u.
Arc
A circular arc — the fitted center + the stroke’s start/end (CCW start→end).
Bezier
A cubic Bezier fallback: [p0, c1, c2, p1] (endpoints + two on-curve controls).
Implementations§
Trait Implementations§
Source§impl Clone for HandDrawShape
impl Clone for HandDrawShape
Source§fn clone(&self) -> HandDrawShape
fn clone(&self) -> HandDrawShape
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandDrawShape
impl Debug for HandDrawShape
Source§impl PartialEq for HandDrawShape
impl PartialEq for HandDrawShape
impl StructuralPartialEq for HandDrawShape
Auto Trait Implementations§
impl Freeze for HandDrawShape
impl RefUnwindSafe for HandDrawShape
impl Send for HandDrawShape
impl Sync for HandDrawShape
impl Unpin for HandDrawShape
impl UnsafeUnpin for HandDrawShape
impl UnwindSafe for HandDrawShape
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> 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