private void AddPath(Byte[] data)
{
if (_KnotCount == 0)
{
_Index += 24;
return;
}
PointD[] point = CreatePoint(data);
if (_InSubpath == false)
{
_Path.AppendFormat(CultureInfo.InvariantCulture, "M {0:0.###} {1:0.###}\n", point[1].X, point[1].Y);
for (int k = 0; k < 3; k++)
{
_First[k] = point[k];
_Last[k] = point[k];
}
}
else
{
if ((_Last[1].X == _Last[2].X) && (_Last[1].Y == _Last[2].Y) && (point[0].X == point[1].X) && (point[0].Y == point[1].Y))
_Path.AppendFormat(CultureInfo.InvariantCulture, "L {0:0.###} {1:0.###}\n", point[1].X, point[1].Y);
else
_Path.AppendFormat(CultureInfo.InvariantCulture, "C {0:0.###} {1:0.###} {2:0.###} {3:0.###} {4:0.###} {5:0.###}\n", _Last[2].X, _Last[2].Y, point[0].X, point[0].Y, point[1].X, point[1].Y);
for (int k = 0; k < 3; k++)
_Last[k] = point[k];
}
_InSubpath = true;
_KnotCount--;
if (_KnotCount == 0)
{
ClosePath();
_InSubpath = false;
}
}