[−][src]Struct raqote::PathBuilder
A helper struct used for constructing a Path
.
Methods
impl PathBuilder
[src]
pub fn new() -> PathBuilder
[src]
pub fn move_to(&mut self, x: f32, y: f32)
[src]
Moves the current point to x
, y
pub fn line_to(&mut self, x: f32, y: f32)
[src]
Adds a line segment from the current point to x
, y
pub fn quad_to(&mut self, cx: f32, cy: f32, x: f32, y: f32)
[src]
Adds a quadratic bezier from the current point to x
, y
,
using a control point of cx
, cy
pub fn rect(&mut self, x: f32, y: f32, width: f32, height: f32)
[src]
Adds a rect to the path
pub fn cubic_to(
&mut self,
cx1: f32,
cy1: f32,
cx2: f32,
cy2: f32,
x: f32,
y: f32
)
[src]
&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
pub fn close(&mut self)
[src]
Closes the current subpath
pub fn arc(&mut self, x: f32, y: f32, r: f32, angle1: f32, angle2: f32)
[src]
Adds an arc approximated by quadratic beziers with center x
, y
and radius r
from angle1
and to angle2
pub fn finish(self) -> Path
[src]
Completes the current path
Trait Implementations
Auto Trait Implementations
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl UnwindSafe for PathBuilder
impl RefUnwindSafe for PathBuilder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,