int offset=0;
if(pageoffsets!=null)
offset=pageoffsets[pageNumber];
ShapeFactory shape = new org.jpedal.render.output.javafx.JavaFXShape(cmd,offset,shapeCount, scaling, currentShape, gs, new AffineTransform(), midPoint, cropBox, currentColor, dpCount, pageRotation, pageData, pageNumber, includeClip);
shape.setShapeNumber(shapeCount);
shapeCount++;
//Stores the content of the shapes that gets outputed in the javafx file
String shapeContent = (String) shape.getContent();
// if(!shape.isEmpty() && shapeContent.contains("MoveTo")) {
if(!shape.isEmpty()) {
writeCustom(SCRIPT, shape.getContent());
System.out.println(currentShape.getBounds());
System.out.println(shapeContent);
//update current color
currentColor = shape.getShapeColor();
}
}