Enum piet_common::kurbo::PathEl
pub enum PathEl {
MoveTo(Point),
LineTo(Point),
QuadTo(Point, Point),
CurveTo(Point, Point, Point),
ClosePath,
}Expand description
The element of a Bézier path.
A valid path has MoveTo at the beginning of each subpath.
Variants
MoveTo(Point)
Move directly to the point without drawing anything, starting a new subpath.
LineTo(Point)
Draw a line from the current location to the point.
QuadTo(Point, Point)
Draw a quadratic bezier using the current location and the two points.
CurveTo(Point, Point, Point)
Draw a cubic bezier using the current location and the three points.
ClosePath
Close off the path.
Implementations
Trait Implementations
impl Extend<PathEl> for BezPath
impl Extend<PathEl> for BezPath
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = PathEl>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = PathEl>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
impl FromIterator<PathEl> for BezPath
impl FromIterator<PathEl> for BezPath
fn from_iter<T>(iter: T) -> BezPathwhere
T: IntoIterator<Item = PathEl>,
fn from_iter<T>(iter: T) -> BezPathwhere
T: IntoIterator<Item = PathEl>,
Creates a value from an iterator. Read more
impl Mul<PathEl> for TranslateScale
impl Mul<PathEl> for TranslateScale
impl Copy for PathEl
impl StructuralPartialEq for PathEl
Auto Trait Implementations
impl RefUnwindSafe for PathEl
impl Send for PathEl
impl Sync for PathEl
impl Unpin for PathEl
impl UnwindSafe for PathEl
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.