newp.addCommand(new MoveTo(mx, my));
beg = newp.size();
continue;
}
PrecisePoint point = commandEnd(command);
if (point.getX() == mx && point.getY() == my && (commandP == null || commandP instanceof MoveTo)) {
PathCommand commandBeg = newp.getCommand(beg);
PrecisePoint pointM = commandEnd(commandM);
PrecisePoint pointBeg = commandEnd(commandBeg);
points = getAnchors(new CurveTo(pointM.getX(), pointM.getY(), mx, my, pointBeg.getX(), pointBeg.getY()),
subsections);
commandEndSet(new PrecisePoint(points[1].getX(), points[1].getY()), commandBeg);
} else if (commandP == null || commandP instanceof MoveTo) {
points[0] = commandEnd(command);
points[1] = new PrecisePoint(Double.NaN, Double.NaN);
} else {
point = commandEnd(command);
PrecisePoint pointM = commandEnd(commandM);
PrecisePoint pointP = commandEnd(commandP);
points = getAnchors(
new CurveTo(pointM.getX(), pointM.getY(), point.getX(), point.getY(), pointP.getX(), pointP.getY()),
subsections);
}
point = commandEnd(command);
newp.addCommand(new CurveTo(x, y, points[0].getX(), points[0].getY(), point.getX(), point.getY()));
x = points[1].getX();