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 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 more