if (verbose)
System.out.println("curvetoCubicSmoothRel: " + x2 + "," + y2 + " " + x + "," + y);
Vertex lastPoint = pathPoints.getLast();
if (lastPoint instanceof BezierVertex){
BezierVertex lastBez = (BezierVertex)lastPoint;
Vertex lastConPointCopy = (Vertex)lastBez.getSecondCtrlPoint().getCopy();
//reflect the last controlpoint at the current point
lastConPointCopy.rotateZ(lastPoint, 180);
BezierVertex b = new BezierVertex(
lastConPointCopy.getX() , lastConPointCopy.getY(), 0,
lastPoint.getX() + x2, lastPoint.getY() + y2, 0,
lastPoint.getX() + x, lastPoint.getY() + y, 0);
pathPoints.add(b);
currentSubPath.add(b);
}else{
if (verbose)
System.out.println("Couldnt get last controlpoint at: curvetoCubicSmoothRel - using last point as first controlpoint");
Vertex lastEndPoint = new Vertex(lastPoint.getX(),lastPoint.getY(),0);
BezierVertex b = new BezierVertex(
lastEndPoint.getX(),lastEndPoint.getY(),0,
lastEndPoint.getX()+ x2, lastEndPoint.getY()+ y2, 0,
lastEndPoint.getX()+ x, lastEndPoint.getY()+ y, 0);
pathPoints.add(b);