Struct raqote::PathBuilder
source · pub struct PathBuilder {
path: Path,
}
Expand description
A helper struct used for constructing a Path
.
Fields§
§path: Path
Implementations§
source§impl PathBuilder
impl PathBuilder
pub fn new() -> PathBuilder
sourcepub fn quad_to(&mut self, cx: f32, cy: f32, x: f32, y: f32)
pub fn quad_to(&mut self, cx: f32, cy: f32, x: f32, y: f32)
Adds a quadratic bezier from the current point to x
, y
,
using a control point of cx
, cy
sourcepub fn cubic_to(
&mut self,
cx1: f32,
cy1: f32,
cx2: f32,
cy2: f32,
x: f32,
y: f32,
)
pub fn cubic_to( &mut self, cx1: f32, cy1: f32, cx2: f32, cy2: f32, x: f32, y: f32, )
Adds a cubic bezier from the current point to x
, y
,
using control points cx1
, cy1
and cx2
, cy2
sourcepub fn arc(
&mut self,
x: f32,
y: f32,
r: f32,
start_angle: f32,
sweep_angle: f32,
)
pub fn arc( &mut self, x: f32, y: f32, r: f32, start_angle: f32, sweep_angle: f32, )
Adds an arc approximated by quadratic beziers with center x
, y
and radius r
starting at start_angle
and sweeping by sweep_angle
.
For a positive sweep_angle
the sweep is done clockwise, for a negative
sweep_angle
the sweep is done counterclockwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin 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