Java Graphics Rotate rotatePoint(Point point, Point centerPoint, double angle)

Here you can find the source of rotatePoint(Point point, Point centerPoint, double angle)

Description

rotate Point

License

Open Source License

Declaration

public static void rotatePoint(Point point, Point centerPoint, double angle) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Point;
import java.awt.geom.AffineTransform;

public class Main {
    public static void rotatePoint(Point point, Point centerPoint, double angle) {

        AffineTransform t = AffineTransform.getRotateInstance(angle, centerPoint.x, centerPoint.y);
        t.transform(point, point);/*from w  w w. j a v  a 2s . co  m*/

    }
}

Related

  1. rotateMoveClockwise(Point move, int size)
  2. rotatePoint(double x0, double y0, double x, double y, double a)
  3. rotatePoint(double x0, double y0, double x, double y, double angle)
  4. rotatePoint(int x, int y, int xC, int yC, float angle)
  5. rotatePoint(Point center, Point p, double angle)
  6. rotatePoint(Point reference, Point toRotate, int degrees)
  7. rotatePoint(Point target, Point origin, double theta)
  8. rotatePoint2D(final Point aPoint, final float aDeg)
  9. rotateRAD(double x, double y, double a)