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>,
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)
Add the items from the iterator to this path.
Note that if you’re attempting to make a continuous path, you will generally
want to ensure that the iterator does not contain any MoveTo
or ClosePath elements.
Note especially that many (open) shapes will start with a MoveTo if
you use their path_elements function.
Some shapes have alternatives for this use case, such as Arc::append_iter.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)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
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more