Struct lyon_algorithms::walk::PathWalker
source · pub struct PathWalker<'l> { /* private fields */ }
Expand description
A helper struct to walk along a flattened path using a builder API.
Implementations§
source§impl<'l> PathWalker<'l>
impl<'l> PathWalker<'l>
pub fn new(start: f32, pattern: &'l mut dyn Pattern) -> PathWalker<'l>
Trait Implementations§
source§impl<'l> PathBuilder for PathWalker<'l>
impl<'l> PathBuilder for PathWalker<'l>
source§fn begin(&mut self, to: Point) -> EndpointId
fn begin(&mut self, to: Point) -> EndpointId
Starts a new sub-path at a given position. Read more
source§fn line_to(&mut self, to: Point) -> EndpointId
fn line_to(&mut self, to: Point) -> EndpointId
Adds a line segment to the current sub-path. Read more
source§fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point) -> EndpointId
fn quadratic_bezier_to(&mut self, ctrl: Point, to: Point) -> EndpointId
Adds a quadratic bézier curve to the current sub-path. Read more
source§fn cubic_bezier_to(
&mut self,
ctrl1: Point,
ctrl2: Point,
to: Point
) -> EndpointId
fn cubic_bezier_to( &mut self, ctrl1: Point, ctrl2: Point, to: Point ) -> EndpointId
Adds a cubic bézier curve to the current sub-path. Read more
source§fn reserve(&mut self, _endpoints: usize, _ctrl_points: usize)
fn reserve(&mut self, _endpoints: usize, _ctrl_points: usize)
Hints at the builder that a certain number of endpoints and control
points will be added. Read more
source§fn path_event(
&mut self,
event: Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>>
)
fn path_event( &mut self, event: Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>> )
Applies the provided path event. Read more
source§fn add_polygon(&mut self, polygon: Polygon<'_, Point2D<f32, UnknownUnit>>)
fn add_polygon(&mut self, polygon: Polygon<'_, Point2D<f32, UnknownUnit>>)
Adds a sub-path from a polygon. Read more
source§fn add_point(&mut self, at: Point2D<f32, UnknownUnit>) -> EndpointId
fn add_point(&mut self, at: Point2D<f32, UnknownUnit>) -> EndpointId
Adds a sub-path containing a single point. Read more
source§fn add_line_segment(
&mut self,
line: &LineSegment<f32>
) -> (EndpointId, EndpointId)
fn add_line_segment( &mut self, line: &LineSegment<f32> ) -> (EndpointId, EndpointId)
Adds a sub-path containing a single line segment. Read more
source§fn add_ellipse(
&mut self,
center: Point2D<f32, UnknownUnit>,
radii: Vector2D<f32, UnknownUnit>,
x_rotation: Angle<f32>,
winding: Winding
)
fn add_ellipse( &mut self, center: Point2D<f32, UnknownUnit>, radii: Vector2D<f32, UnknownUnit>, x_rotation: Angle<f32>, winding: Winding )
Adds a sub-path containing an ellipse. Read more
source§fn add_circle(
&mut self,
center: Point2D<f32, UnknownUnit>,
radius: f32,
winding: Winding
)where
Self: Sized,
fn add_circle(
&mut self,
center: Point2D<f32, UnknownUnit>,
radius: f32,
winding: Winding
)where
Self: Sized,
Adds a sub-path containing a circle. Read more
source§fn add_rectangle(&mut self, rect: &Rect<f32, UnknownUnit>, winding: Winding)
fn add_rectangle(&mut self, rect: &Rect<f32, UnknownUnit>, winding: Winding)
Adds a sub-path containing a rectangle. Read more
source§fn add_rounded_rectangle(
&mut self,
rect: &Rect<f32, UnknownUnit>,
radii: &BorderRadii,
winding: Winding
)where
Self: Sized,
fn add_rounded_rectangle(
&mut self,
rect: &Rect<f32, UnknownUnit>,
radii: &BorderRadii,
winding: Winding
)where
Self: Sized,
Adds a sub-path containing a rectangle. Read more
source§fn flattened(self, tolerance: f32) -> Flattened<Self>where
Self: Sized,
fn flattened(self, tolerance: f32) -> Flattened<Self>where
Self: Sized,
Returns a builder that approximates all curves with sequences of line segments.
source§fn transformed<Transform>(
self,
transform: Transform
) -> Transformed<Self, Transform>
fn transformed<Transform>( self, transform: Transform ) -> Transformed<Self, Transform>
Returns a builder that applies the given transformation to all positions.
Auto Trait Implementations§
impl<'l> !RefUnwindSafe for PathWalker<'l>
impl<'l> !Send for PathWalker<'l>
impl<'l> !Sync for PathWalker<'l>
impl<'l> Unpin for PathWalker<'l>
impl<'l> !UnwindSafe for PathWalker<'l>
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