private void DrawBezeier(PointF p1, PointF p2, PointF p3, PointF p4, Graphics g) { PointF lastbezeirpoint, bezeirpoint; lastbezeirpoint = p1; var count = BezierCaliculate.AboutBezeirCount(ref p1, ref p2, ref p3, ref p4); for (int i = count; i >= 0; i--) { float t = (float)i / count; bezeirpoint = BezierCaliculate.GetBezeirPoint(ref p1, ref p2, ref p3, ref p4, ref t); g.DrawLine(Pens.Black, lastbezeirpoint, bezeirpoint); lastbezeirpoint = bezeirpoint; } }
private void DrawBezeier(PointF p1, PointF p2, PointF p3, PointF p4, IBezierDrawContext context) { PointF lastbezeirpoint, bezeirpoint; lastbezeirpoint = p1; var count = BezierCaliculate.AboutBezeirCount(ref p1, ref p2, ref p3, ref p4); for (int i = count; i >= 0; i--) { float t = (float)i / count; bezeirpoint = BezierCaliculate.GetBezeirPoint(ref p1, ref p2, ref p3, ref p4, ref t); context.DrawLine(Color.Black, lastbezeirpoint, bezeirpoint); lastbezeirpoint = bezeirpoint; } }