*/
public void curvetoQuadraticSmoothAbs(float x, float y) throws ParseException {
if (verbose)
System.out.println("curvetoQuadraticSmoothAbs " + " x:" + x+ " y:" + y);
Vertex lastPoint = pathPoints.getLast();
if (lastPoint instanceof BezierVertex && cubicBezVertTOQuadricControlPoint.get(lastPoint) != null){
Vertex lastEndPoint = new Vertex(pathPoints.getLast().getX(), pathPoints.getLast().getY(), pathPoints.getLast().getZ());
//Get control point of last QuadTo
Vertex lastQuadControlPoint = cubicBezVertTOQuadricControlPoint.get(lastPoint);
cubicBezVertTOQuadricControlPoint.remove(lastPoint);
//Rotate that controlpoint around the end point of the last QuadTo
lastQuadControlPoint.rotateZ(lastEndPoint, 180);
//Put in startPoint = last QuadTo Endpoint of this smoothQuadTo, the calculated control point, and the endpoint of smoothQuadTo
BezierVertex b5 = ToolsGeometry.getCubicFromQuadraticCurve(lastEndPoint, lastQuadControlPoint , new Vertex(x, y, 0));
//Save last quad control point
cubicBezVertTOQuadricControlPoint.put(b5, lastQuadControlPoint);
pathPoints.add(b5);
currentSubPath.add(b5);
}else{
if (verbose)
System.out.println("Couldnt get last controlpoint at: curvetoQuadraticSmoothAbs - using last point as controlpoint");
//If we couldnt retrieve the controlpoint of the current point,
//we use the current point as the new controlpoint
Vertex lastEndPoint = new Vertex(lastPoint.getX(),lastPoint.getY(),0);
Vertex quadControlPoint = new Vertex(lastPoint.getX(),lastPoint.getY(),0);
BezierVertex b5 = ToolsGeometry.getCubicFromQuadraticCurve(
lastEndPoint,
quadControlPoint ,
new Vertex(x, y, 0));
cubicBezVertTOQuadricControlPoint.put(b5, quadControlPoint);
pathPoints.add(b5);
currentSubPath.add(b5);
}