List of usage examples for java.awt.geom AffineTransform AffineTransform
public AffineTransform()
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.setToScale(Math.PI / 6, Math.PI / 6); g2.setTransform(at);/*from w w w . ja va 2s . 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.setToShear(Math.PI / 6, Math.PI / 6); g2.setTransform(at);/* w w w.jav a 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.setToRotation(Math.PI / 6, Math.PI / 6); at.translate(100, 0);//from w w w. j a v a 2 s . c o m g2.setTransform(at); 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.setToRotation(0.2, 0.2, Math.PI / 6, Math.PI / 6); at.translate(100, 0);/* w w w. j a v a 2 s .co m*/ g2.setTransform(at); 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.setToRotation(0.2, Math.PI / 6, Math.PI / 6); at.translate(100, 0);//from w ww . j a va 2s . c o m g2.setTransform(at); 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);/* w w w . java 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);//from w ww.ja v a 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.getScaleY()); g2.setTransform(at);/* www . ja v a2s. 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 w ww . j av a 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.getShearX()); g2.setTransform(at);//from w ww. j av a 2 s . co m g2.draw(shape); }