struct StrokeCtx {
output: BezPath,
forward_path: BezPath,
backward_path: BezPath,
start_pt: Point,
start_norm: Vec2,
start_tan: Vec2,
last_pt: Point,
last_tan: Vec2,
join_thresh: f64,
}
Expand description
Internal structure used for creating strokes.
Fields§
§output: BezPath
§forward_path: BezPath
§backward_path: BezPath
§start_pt: Point
§start_norm: Vec2
§start_tan: Vec2
§last_pt: Point
§last_tan: Vec2
§join_thresh: f64
Implementations§
Source§impl StrokeCtx
impl StrokeCtx
Sourcefn finish_closed(&mut self, style: &Stroke)
fn finish_closed(&mut self, style: &Stroke)
Finish a closed path
fn do_join(&mut self, style: &Stroke, tan0: Vec2)
fn do_line(&mut self, style: &Stroke, tangent: Vec2, p1: Point)
fn do_cubic( &mut self, style: &Stroke, c: CubicBez, tolerance: f64, opts: StrokeOpts, )
Sourcefn do_linear(
&mut self,
style: &Stroke,
c: CubicBez,
p: [f64; 4],
ref_pt: Point,
ref_vec: Vec2,
)
fn do_linear( &mut self, style: &Stroke, c: CubicBez, p: [f64; 4], ref_pt: Point, ref_vec: Vec2, )
Do a cubic which is actually linear.
The p
argument is the control points projected to the reference chord.
The ref arguments are the inverse map of a projection back to the client
coordinate space.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StrokeCtx
impl RefUnwindSafe for StrokeCtx
impl Send for StrokeCtx
impl Sync for StrokeCtx
impl Unpin for StrokeCtx
impl UnwindSafe for StrokeCtx
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