Example usage for com.itextpdf.awt.geom AffineTransform getRotateInstance

List of usage examples for com.itextpdf.awt.geom AffineTransform getRotateInstance

Introduction

In this page you can find the example usage for com.itextpdf.awt.geom AffineTransform getRotateInstance.

Prototype

public static AffineTransform getRotateInstance(double angle) 

Source Link

Usage

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;
}