[][src]Struct nannou::geom::path::Builder

pub struct Builder { /* fields omitted */ }

A type used for building a 2D lyon path.

Implementations

impl Builder[src]

pub fn new() -> Self[src]

Begin building a new path.

pub fn with_capacity(points: usize, edges: usize) -> Self[src]

Build a path with the given capacity for the inner path event storage.

pub fn with_svg(self) -> SvgPathBuilder<Self>[src]

Returns a lyon builder that supports SVG commands.

pub fn flattened(self, tolerance: f32) -> FlatteningBuilder<Self>[src]

Returns a lyon builder that approximates all curves with sequences of line segments.

pub fn move_to(self, to: Point2) -> Self[src]

Sets the position in preparation for the next sub-path.

If the current sub-path contains edges, this ends the sub-path without closing it.

pub fn line_to(self, to: Point2) -> Self[src]

Adds a line segment to the current sub-path and sets the current position.

pub fn close(self) -> Self[src]

Closes the current sub path and sets the current position to the first position of the current sub-path.

pub fn quadratic_bezier_to(self, ctrl: Point2, to: Point2) -> Self[src]

Add a quadratic bezier curve to the path.

pub fn cubic_bezier_to(self, ctrl1: Point2, ctrl2: Point2, to: Point2) -> Self[src]

Add a cubic bezier curve to the path.

pub fn arc(
    self,
    center: Point2,
    radii: Vector2,
    sweep_angle_radians: f32,
    x_rotation_radians: f32
) -> Self
[src]

Add an arc to the path.

pub fn polygon(self, points: &[Point2]) -> Self[src]

Add a closed polygon.

pub fn position(&self) -> Point2[src]

Returns the current position of the head of the path.

pub fn build(self) -> Path[src]

Build the path and return it.

pub fn inner(&self) -> &Builder[src]

Access to the inner lyon::path::Builder.

pub fn inner_mut(&mut self) -> &mut Builder[src]

Mutable access to the inner lyon::path::Builder.

Trait Implementations

impl Build for Builder[src]

type PathType = Path

The type of object that is created by this builder.

impl FlatPathBuilder for Builder[src]

impl From<Builder> for Builder[src]

impl Into<Builder> for Builder[src]

impl PathBuilder for Builder[src]

impl PolygonBuilder for Builder[src]

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,