use of com.itextpdf.kernel.geom.AffineTransform in project i7j-pdfsweep by itext.
the class PdfCleanUpFilter method transformPoints.
private static Point[] transformPoints(Matrix transformationMatrix, boolean inverse, Point... points) {
AffineTransform t = new AffineTransform(transformationMatrix.get(Matrix.I11), transformationMatrix.get(Matrix.I12), transformationMatrix.get(Matrix.I21), transformationMatrix.get(Matrix.I22), transformationMatrix.get(Matrix.I31), transformationMatrix.get(Matrix.I32));
Point[] transformed = new Point[points.length];
if (inverse) {
try {
t = t.createInverse();
} catch (NoninvertibleTransformException e) {
throw new PdfException(CleanupExceptionMessageConstant.NONINVERTIBLE_MATRIX_CANNOT_BE_PROCESSED, e);
}
}
t.transform(points, 0, transformed, 0, points.length);
return transformed;
}
Aggregations