[−][src]Struct nannou::geom::path::Builder
A type used for building a 2D lyon path.
Methods
impl Builder
[src]
pub fn new() -> Self
[src]
Begin building a new path.
pub fn with_capacity(cap: 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]
self,
center: Point2,
radii: Vector2,
sweep_angle_radians: f32,
x_rotation_radians: f32
) -> Self
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 cursor(&self) -> Cursor
[src]
Returns a cursor to the next path event.
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 Into<Builder> for Builder
[src]
impl From<Builder> for Builder
[src]
impl FlatPathBuilder for Builder
[src]
fn move_to(&mut self, to: Point)
[src]
fn line_to(&mut self, to: Point)
[src]
fn close(&mut self)
[src]
fn current_position(&self) -> Point
[src]
fn flat_event(&mut self, event: FlattenedEvent)
[src]
fn flattened(self, tolerance: f32) -> FlatteningBuilder<Self>
impl Build for Builder
[src]
type PathType = Path
The type of object that is created by this builder.
fn build(self) -> Self::PathType
[src]
fn build_and_reset(&mut self) -> Self::PathType
[src]
impl PathBuilder for Builder
[src]
fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point)
[src]
fn cubic_bezier_to(&mut self, ctrl1: Point, ctrl2: Point, to: Point)
[src]
fn arc(
&mut self,
center: Point,
radii: Vector,
sweep_angle: Angle,
x_rotation: Angle
)
[src]
&mut self,
center: Point,
radii: Vector,
sweep_angle: Angle,
x_rotation: Angle
)
fn path_event(&mut self, event: PathEvent)
[src]
fn with_svg(self) -> SvgPathBuilder<Self>
impl PolygonBuilder for Builder
[src]
Auto Trait Implementations
impl Send for Builder
impl Unpin for Builder
impl Sync for Builder
impl UnwindSafe for Builder
impl RefUnwindSafe for Builder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
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]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,