List of usage examples for com.itextpdf.awt.geom AffineTransform getRotateInstance
public static AffineTransform getRotateInstance(double angle)
From source file:mkl.testarea.itext5.pdfcleanup.PdfCleanUpRegionFilter.java
License:Open Source License
private static Point2D[] getRotatedSquareVertices(Point2D[] orthogonalSquareVertices, double angle, Point2D squareCenter) {/*w ww .j a v a2 s . c o m*/ Point2D[] rotatedSquareVertices = new Point2D[orthogonalSquareVertices.length]; AffineTransform.getRotateInstance(angle).transform(orthogonalSquareVertices, 0, rotatedSquareVertices, 0, rotatedSquareVertices.length); AffineTransform.getTranslateInstance(squareCenter.getX(), squareCenter.getY()) .transform(rotatedSquareVertices, 0, rotatedSquareVertices, 0, orthogonalSquareVertices.length); return rotatedSquareVertices; }