pub struct PathBuilder { /* private fields */ }Expand description
A fluent builder for Path.
Every method returns Self so a path can be assembled in one
expression without a mutable borrow in the middle of a call chain.
Implementations§
Source§impl PathBuilder
Inherent implementation of PathBuilder.
impl PathBuilder
Inherent implementation of PathBuilder.
Sourcepub fn cubic_to(
self,
control1_x: f32,
control1_y: f32,
control2_x: f32,
control2_y: f32,
x: f32,
y: f32,
) -> Self
pub fn cubic_to( self, control1_x: f32, control1_y: f32, control2_x: f32, control2_y: f32, x: f32, y: f32, ) -> Self
Sourcepub fn arc(
self,
center_x: f32,
center_y: f32,
radius_x: f32,
radius_y: f32,
start_angle: f64,
end_angle: f64,
) -> Self
pub fn arc( self, center_x: f32, center_y: f32, radius_x: f32, radius_y: f32, start_angle: f64, end_angle: f64, ) -> Self
Appends an elliptical arc centered at the given point.
start_angle and end_angle are measured in radians, clockwise
from the positive x-axis (the y-axis points down, matching the
Canvas2D and SVG conventions). The arc is approximated with cubic
Bézier segments.
§Arguments
f32- A 32-bit float (f32).f64- A 64-bit float (f64).
Trait Implementations§
Source§impl Clone for PathBuilder
impl Clone for PathBuilder
Source§impl Debug for PathBuilder
impl Debug for PathBuilder
Source§impl Default for PathBuilder
Default construction for PathBuilder.
impl Default for PathBuilder
Default construction for PathBuilder.
Source§fn default() -> Self
fn default() -> Self
Constructs a default PathBuilder value.
Auto Trait Implementations§
impl Freeze for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl UnsafeUnpin for PathBuilder
impl UnwindSafe for PathBuilder
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