double x1 = parser.getCurrentPoint().getX();
double y1 = parser.getCurrentPoint().getY();
parser.getCurrentPoint().setLocation( Double.parseDouble(parser.getParams()[i+5]),
Double.parseDouble(parser.getParams()[i+6]));
(new Arc()).arcTo( parser.getPath(),
(float) xRadius, (float) yRadius,
(float) rotation,
largeArcFlag, sweepFlag,
(float) parser.getCurrentPoint().getX(), (float) parser.getCurrentPoint().getY(),
(float) x1, (float) y1);
}
parser.setLastControlPointC(null);
parser.setLastControlPointQ(null);
}
});
commands.put("a", new PathCommand(){
public void perform(PathParser parser){
for(int i = 1; parser.getParams().length - i >= 7; i+= 7){
double xRadius = Math.abs(Double.parseDouble(parser.getParams()[i]));
double yRadius = Math.abs(Double.parseDouble(parser.getParams()[i+1]));
double rotation = Double.parseDouble(parser.getParams()[i+2]);
boolean largeArcFlag = Double.parseDouble(parser.getParams()[i+3]) != 0;
boolean sweepFlag = Double.parseDouble(parser.getParams()[i+4]) != 0;
double x1 = parser.getCurrentPoint().getX();
double y1 = parser.getCurrentPoint().getY();
parser.getCurrentPoint().setLocation( parser.getCurrentPoint().getX() + Double.parseDouble(parser.getParams()[i+5]),
parser.getCurrentPoint().getY() + Double.parseDouble(parser.getParams()[i+6]));
(new Arc()).arcTo( parser.getPath(),
(float) xRadius, (float) yRadius,
(float) rotation,
largeArcFlag, sweepFlag,
(float) parser.getCurrentPoint().getX(), (float) parser.getCurrentPoint().getY(),
(float) x1, (float) y1);