Struct footile::PathBuilder
source · pub struct PathBuilder { /* private fields */ }
Expand description
Implementations
sourceimpl PathBuilder
impl PathBuilder
sourcepub fn new() -> PathBuilder
pub fn new() -> PathBuilder
Create a new PathBuilder.
sourcepub fn relative(self) -> Self
pub fn relative(self) -> Self
Use relative coordinates for subsequent operations.
This is the default setting.
sourcepub fn move_to(self, bx: f32, by: f32) -> Self
pub fn move_to(self, bx: f32, by: f32) -> Self
Move pen to a point.
bx
X-position of point.by
Y-position of point.
sourcepub fn line_to(self, bx: f32, by: f32) -> Self
pub fn line_to(self, bx: f32, by: f32) -> Self
Add a line from pen to a point.
bx
X-position of end point.by
Y-position of end point.
sourcepub fn quad_to(self, bx: f32, by: f32, cx: f32, cy: f32) -> Self
pub fn quad_to(self, bx: f32, by: f32, cx: f32, cy: f32) -> Self
Add a quadratic bézier spline.
The points are A (current pen position), B (control point), and C (spline end point).
bx
X-position of control point.by
Y-position of control point.cx
X-position of end point.cy
Y-position of end point.
sourcepub fn cubic_to(self, bx: f32, by: f32, cx: f32, cy: f32, dx: f32, dy: f32) -> Self
pub fn cubic_to(self, bx: f32, by: f32, cx: f32, cy: f32, dx: f32, dy: f32) -> Self
Add a cubic bézier spline.
The points are A (current pen position), B (first control point), C (second control point) and D (spline end point).
bx
X-position of first control point.by
Y-position of first control point.cx
X-position of second control point.cy
Y-position of second control point.dx
X-position of end point.dy
Y-position of end point.
Auto Trait Implementations
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl UnwindSafe for PathBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more