public void AddPath(GraphicsPath addingPath, bool connect)
{
if (addingPath == null)
throw new ArgumentNullException ("addingPath");
var length = addingPath.PointCount;
if (length < 1)
return;
var pts = addingPath.PathPoints;
var types = addingPath.PathTypes;
// We can connect only open figures. If first figure is closed
// it can't be connected.
var first = connect ? GetFirstPointType() : PathPointType.Start;
AppendPoint (pts[0], first, false);
for (int i = 1; i < length; i++)
AppendPoint (pts [i], (PathPointType)types [i], false);
}