struct ExpandCtx {
expand: Diagonal2,
join: Join,
miter_limit: f64,
tolerance: f64,
result: BezPath,
first_n: Option<Vec2>,
first_tan: Vec2,
last_pt: Point,
last_n: Option<Vec2>,
last_tan: Vec2,
}Fields§
§expand: Diagonal2§join: Join§miter_limit: f64§tolerance: f64§result: BezPath§first_n: Option<Vec2>§first_tan: Vec2§last_pt: Point§last_n: Option<Vec2>§last_tan: Vec2Implementations§
Source§impl ExpandCtx
impl ExpandCtx
Sourcefn in_tolerance(&self, v: Vec2) -> bool
fn in_tolerance(&self, v: Vec2) -> bool
Helper function to determine if a distance is within tolerance.
Sourcefn do_quad(&mut self, p1: Point, p2: Point)
fn do_quad(&mut self, p1: Point, p2: Point)
Process a quadratic Bézier segment. Includes initial join.
Sourcefn do_cubic(&mut self, p1: Point, p2: Point, p3: Point)
fn do_cubic(&mut self, p1: Point, p2: Point, p3: Point)
Process a cubic segment. Includes initial join.
Sourcefn do_join(&mut self, n: Vec2, tan: Vec2, is_line: bool)
fn do_join(&mut self, n: Vec2, tan: Vec2, is_line: bool)
Do a join.
The tan parameter is a vector tangent to the start of the new segment.
The n parameter is the normal vector (turned tangent) scaled by the expansion.
Sourcefn do_close_path(&mut self, first_pt: Point)
fn do_close_path(&mut self, first_pt: Point)
Close an open subpath if there is one; no-op if already closed.
Auto Trait Implementations§
impl Freeze for ExpandCtx
impl RefUnwindSafe for ExpandCtx
impl Send for ExpandCtx
impl Sync for ExpandCtx
impl Unpin for ExpandCtx
impl UnsafeUnpin for ExpandCtx
impl UnwindSafe for ExpandCtx
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