pub struct Feature {
pub ty: FeatureType,
pub cubics: Vec<Cubic>,
}Expand description
While a polygon’s shape can be drawn solely using a list of Cubic
objects representing its raw curves and lines, features add an extra layer
of context to groups of cubics.
Features group cubics into (straight) edges, convex corners, or concave corners. For example, rounding a rectangle adds many cubics around its edges, but the rectangle’s overall number of corners remains the same.
Fields§
§ty: FeatureType§cubics: Vec<Cubic>Implementations§
Source§impl Feature
impl Feature
pub const fn edge(cubics: Vec<Cubic>) -> Self
pub const fn corner(cubics: Vec<Cubic>, convex: bool) -> Self
Sourcepub fn transformed<T: PointTransformer>(self, f: &T) -> Self
pub fn transformed<T: PointTransformer>(self, f: &T) -> Self
Returns a Feature with cubics transformed using the provided
reference to type that implements PointTransformer trait.
Trait Implementations§
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnsafeUnpin for Feature
impl UnwindSafe for Feature
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