pub struct Path {
pub verbs: Vec<PathVerb>,
pub fill_rule: Option<FillRule>,
pub stroke: Option<StrokeStyle>,
}Expand description
A 2D vector path composed of a sequence of path verbs.
Fields§
§verbs: Vec<PathVerb>§fill_rule: Option<FillRule>§stroke: Option<StrokeStyle>Implementations§
Source§impl Path
impl Path
pub fn new() -> Self
pub fn with_fill(self, rule: FillRule) -> Self
pub fn with_stroke(self, stroke: StrokeStyle) -> Self
Sourcepub fn to_quadratics(&self, tolerance: f32) -> Vec<QuadraticBezier>
pub fn to_quadratics(&self, tolerance: f32) -> Vec<QuadraticBezier>
Decomposes all path verbs into a flat sequence of Quadratic Bézier curves.
Sourcepub fn bounding_box(&self) -> Option<Rect2D>
pub fn bounding_box(&self) -> Option<Rect2D>
Computes the bounding box for the entire path.
Trait Implementations§
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Forget for Path
impl Freeze for Path
impl Move for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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