Example usage for java.awt.geom AffineTransform setToQuadrantRotation

List of usage examples for java.awt.geom AffineTransform setToQuadrantRotation

Introduction

In this page you can find the example usage for java.awt.geom AffineTransform setToQuadrantRotation.

Prototype

public void setToQuadrantRotation(int numquadrants, double anchorx, double anchory) 

Source Link

Document

Sets this transform to a translated rotation transformation that rotates coordinates by the specified number of quadrants around the specified anchor point.

Usage

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    g2.setTransform(at);/*from   w w w .  j  a v a2  s  . co m*/
    g2.draw(shape);

}

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    System.out.println(at.getScaleX());

    g2.setTransform(at);//from www .  ja va  2 s .  c  o  m
    g2.draw(shape);

}

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    System.out.println(at.getShearY());

    g2.setTransform(at);// w w  w . jav a  2s. c  om
    g2.draw(shape);

}

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    System.out.println(at.getScaleY());

    g2.setTransform(at);//from  ww w .j  a v  a2  s.c  o m
    g2.draw(shape);

}

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    System.out.println(at.getTranslateX());

    g2.setTransform(at);//from  www. j  ava2 s . c  o m
    g2.draw(shape);

}

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    System.out.println(at.getShearX());

    g2.setTransform(at);//www .j  a  va  2 s  .c o  m
    g2.draw(shape);

}

From source file:Main.java

public void paint(Graphics g) {
    Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

    Graphics2D g2 = (Graphics2D) g;

    AffineTransform at = new AffineTransform();
    at.setToQuadrantRotation(2, 0.5, 0.5);

    System.out.println(at.getTranslateY());

    g2.setTransform(at);/*www. jav a  2  s  .  co  m*/
    g2.draw(shape);

}