return src;
}
/**
* Transforms src shape to fxBounds
*/
PerspectiveTransform ptx = PerspectiveTransform.getQuadToQuad(srcBounds.getMinX(), srcBounds.getMinY(), srcBounds.getMaxX(), srcBounds.getMinY(),
srcBounds.getMaxX(), srcBounds.getMaxY(), srcBounds.getMinX(), srcBounds.getMaxY(),
fxBounds.getMinX(), fxBounds.getMinY(), fxBounds.getMaxX(), fxBounds.getMinY(),
fxBounds.getMaxX(), fxBounds.getMaxY(), fxBounds.getMinX(), fxBounds.getMaxY());
/**
* instance a transformed shape throughout a GeneralPath
*/
final Vector<Map<Integer, float[]>> perspectiveTransformPoly = new Vector<Map<Integer, float[]>>();
final PathIterator pi = src.getShape().getPathIterator(null);
final GeneralPath gp = new GeneralPath(pi.getWindingRule());
while (!pi.isDone()) {
float[] coords = new float[6];
float[] fxCoords = new float[6];
int path = pi.currentSegment(coords);
perspectiveTransformPoly.add(Collections.singletonMap(path, fxCoords));
switch (path) {
case PathIterator.SEG_MOVETO:
ptx.transform(coords, 0, fxCoords, 0, 1);
break;
case PathIterator.SEG_CLOSE:
break;
case PathIterator.SEG_LINETO:
ptx.transform(coords, 0, fxCoords, 0, 1);
break;
case PathIterator.SEG_CUBICTO:
ptx.transform(coords, 0, fxCoords, 0, 3);
break;
case PathIterator.SEG_QUADTO:
ptx.transform(coords, 0, fxCoords, 0, 2);
break;
default:
break;
}
pi.next();