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§
source§impl<'de> Deserialize<'de> for PathEl
impl<'de> Deserialize<'de> for PathEl
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Extend<PathEl> for BezPath
impl Extend<PathEl> for BezPath
source§fn extend<I: IntoIterator<Item = PathEl>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = PathEl>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl FromIterator<PathEl> for BezPath
impl FromIterator<PathEl> for BezPath
source§impl JsonSchema for PathEl
impl JsonSchema for PathEl
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Mul<PathEl> for TranslateScale
impl Mul<PathEl> for TranslateScale
impl Copy for PathEl
impl StructuralPartialEq for PathEl
Auto Trait Implementations§
impl Freeze for PathEl
impl RefUnwindSafe for PathEl
impl Send for PathEl
impl Sync for PathEl
impl Unpin for PathEl
impl UnwindSafe for PathEl
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)