pub fn stroke_bezier<Pt: Into<LocalPoint>>(
        &mut self,
        a: Pt,
        b: Pt,
        c: Pt,
        width: f32,
        paint_index: PaintIndex,
    ) {
        let mut prim = Prim::default();
        prim.prim_type = PrimType::Bezier as u32;
        let ap: LocalPoint = a.into();
        let bp: LocalPoint = b.into();
        let cp: LocalPoint = c.into();
        prim.cvs[0] = ap.x;
        prim.cvs[1] = ap.y;
        prim.cvs[2] = bp.x;
        prim.cvs[3] = bp.y;
        prim.cvs[4] = cp.x;
        prim.cvs[5] = cp.y;
        prim.width = width;
        prim.paint = paint_index.index as u32;
        prim.quad_bounds = [
            ap.x.min(bp.x).min(cp.x) - width,
            ap.y.min(bp.y).min(cp.y) - width,
            ap.x.max(bp.x).max(cp.x) + width,
            ap.y.max(bp.y).max(cp.y) + width,
        ];
        prim.tex_bounds = prim.quad_bounds;
        prim.xform = self.add_xform() as u32;

        self.render(prim);
    }
/// Strokes a quadratic bezier segment.
Strokes a quadratic bezier segment.
Strokes a quadratic bezier segment .
pub fn stroke_bezier<Pt: Into<LocalPoint>>(
        &mut self,
        a: Pt,
        b: Pt,
        c: Pt,
        width: f32,
        paint_index: PaintIndex,
    ) {
        let mut prim = Prim::default();
        prim.prim_type = PrimType::Bezier as u32;
        let ap: LocalPoint = a.into();
        let bp: LocalPoint = b.into();
        let cp: LocalPoint = c.into();
        prim.cvs[0] = ap.x;
        prim.cvs[1] = ap.y;
        prim.cvs[2] = bp.x;
        prim.cvs[3] = bp.y;
        prim.cvs[4] = cp.x;
        prim.cvs[5] = cp.y;
        prim.width = width;
        prim.paint = paint_index.index as u32;
        prim.quad_bounds = [
            ap.x.min(bp.x).min(cp.x) - width,
            ap.y.min(bp.y).min(cp.y) - width,
            ap.x.max(bp.x).max(cp.x) + width,
            ap.y.max(bp.y).max(cp.y) + width,
        ];
        prim.tex_bounds = prim.quad_bounds;
        prim.xform = self.add_xform() as u32;
        self.render(prim);
    }
pub fn stroke_bezier < Pt : Into < LocalPoint > > ( & mut self , a : Pt , b : Pt , c : Pt , width : f32 , paint_index : PaintIndex , ) { let mut prim = Prim :: default ( ) ; prim . prim_type = PrimType :: Bezier as u32 ; let ap : LocalPoint = a . into ( ) ; let bp : LocalPoint = b . into ( ) ; let cp : LocalPoint = c . into ( ) ; prim . cvs [ 0 ] = ap . x ; prim . cvs [ 1 ] = ap . y ; prim . cvs [ 2 ] = bp . x ; prim . cvs [ 3 ] = bp . y ; prim . cvs [ 4 ] = cp . x ; prim . cvs [ 5 ] = cp . y ; prim . width = width ; prim . paint = paint_index . index as u32 ; prim . quad_bounds = [ ap . x . min ( bp . x ) . min ( cp . x ) - width , ap . y . min ( bp . y ) . min ( cp . y ) - width , ap . x . max ( bp . x ) . max ( cp . x ) + width , ap . y . max ( bp . y ) . max ( cp . y ) + width , ] ; prim . tex_bounds = prim . quad_bounds ; prim . xform = self . add_xform ( ) as u32 ; self . render ( prim ) ; }
Strokes a quadratic bezier segment.
Strokes a quadratic bezier segment .
&mut self
a
Pt
b
Pt
c
Pt
width
f32
paint_index
PaintIndex
&mut self
a
Pt
b
Pt
c
Pt
width
f32
paint_index
PaintIndex