if (data.getWidth(renderableImpl.io.obs) <= 0 || data.getHeight(renderableImpl.io.obs) <= 0) {
throw new JXAException(toString() + " image data size was not available!");
}
}
if (!basePtx.isIdentity()) {
basePtx.preConcatenate(baseTx.createInverse());
double[] perspectiveTransform = new double[]{0, 0, renderableImpl.bounds.getWidth(), 0, renderableImpl.bounds.getWidth(), renderableImpl.bounds.getHeight(), 0, renderableImpl.bounds.getHeight()};
basePtx.inverseTransform(perspectiveTransform, 0, perspectiveTransform, 0, 4);
Polygon perspectiveTransformPoly = new Polygon();
for (int i = 0; i < perspectiveTransform.length; i += 2) {
perspectiveTransformPoly.addPoint((int) perspectiveTransform[i], (int) perspectiveTransform[i + 1]);