private DrawCurves ( |
||
graphics | graphics handle | |
curves | List |
curves to be drawn |
transform | Matrix | transform between canvas and graphic data |
pen | pen to draw | |
return | void |
private void DrawCurves(Graphics graphics, List<PointF[]> curves, Matrix transform, Pen pen)
{
foreach (PointF[] curve in curves)
{
GraphicsPath gPath = new GraphicsPath();
if (curve.Length == 0)
{
break;
}
if (curve.Length == 1)
{
gPath.AddArc(new RectangleF(curve[0], new SizeF(0.5f, 0.5f)), 0.0f, (float)Math.PI);
}
else
{
gPath.AddLines(curve);
}
gPath.Transform(transform);
graphics.DrawPath(pen, gPath);
}
}