Struct rasterize::PathBuilder [−][src]
pub struct PathBuilder { /* fields omitted */ }
Path builder similar to Canvas/Cairo interface.
Implementations
impl PathBuilder
[src]
impl PathBuilder
[src]pub fn new() -> Self
[src]
pub fn from_path(path: Path) -> Self
[src]
pub fn build(&mut self) -> Path
[src]
Build path
pub fn append_svg_path(
&mut self,
string: impl AsRef<[u8]>
) -> Result<&mut Self, SvgPathParserError>
[src]
&mut self,
string: impl AsRef<[u8]>
) -> Result<&mut Self, SvgPathParserError>
Extend path from string, which is specified in the same format as SVGs path element.
pub fn move_to(&mut self, p: impl Into<Point>) -> &mut Self
[src]
Move current position, ending current subpath
pub fn close(&mut self) -> &mut Self
[src]
Close current subpath
pub fn line_to(&mut self, p: impl Into<Point>) -> &mut Self
[src]
Add line from the current position to the specified point
pub fn quad_to(
&mut self,
p1: impl Into<Point>,
p2: impl Into<Point>
) -> &mut Self
[src]
&mut self,
p1: impl Into<Point>,
p2: impl Into<Point>
) -> &mut Self
Add quadratic bezier curve
pub fn quad_smooth_to(&mut self, p2: impl Into<Point>) -> &mut Self
[src]
Add smooth quadratic bezier curve
pub fn cubic_to(
&mut self,
p1: impl Into<Point>,
p2: impl Into<Point>,
p3: impl Into<Point>
) -> &mut Self
[src]
&mut self,
p1: impl Into<Point>,
p2: impl Into<Point>,
p3: impl Into<Point>
) -> &mut Self
Add cubic beizer curve
pub fn cubic_smooth_to(
&mut self,
p2: impl Into<Point>,
p3: impl Into<Point>
) -> &mut Self
[src]
&mut self,
p2: impl Into<Point>,
p3: impl Into<Point>
) -> &mut Self
Add smooth cubic bezier curve
pub fn arc_to(
&mut self,
radii: impl Into<Point>,
x_axis_rot: Scalar,
large: bool,
sweep: bool,
p: impl Into<Point>
) -> &mut Self
[src]
&mut self,
radii: impl Into<Point>,
x_axis_rot: Scalar,
large: bool,
sweep: bool,
p: impl Into<Point>
) -> &mut Self
Add elliptic arc segment
pub fn circle(&mut self, radius: Scalar) -> &mut Self
[src]
Add circle with the center at current position and provided radius.
Current position is not changed after invocation.
pub fn rbox(
&mut self,
size: impl Into<Point>,
radii: impl Into<Point>
) -> &mut Self
[src]
&mut self,
size: impl Into<Point>,
radii: impl Into<Point>
) -> &mut Self
Add box with rounded corners, with current position being low-x and low-y coordinate
pub fn position(&self) -> Point
[src]
Current possition of the builder
Trait Implementations
impl Clone for PathBuilder
[src]
impl Clone for PathBuilder
[src]fn clone(&self) -> PathBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for PathBuilder
[src]
impl Default for PathBuilder
[src]Auto Trait Implementations
impl RefUnwindSafe for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl Unpin for PathBuilder
impl UnwindSafe for PathBuilder
impl UnwindSafe for PathBuilder