Examples of quadrantRotate()


Examples of java.awt.geom.AffineTransform.quadrantRotate()

                int strWidth = fontMetrics.stringWidth(label);
                int strX = (bottom + strWidth) / 2;

                AffineTransform t = ((Graphics2D) g).getTransform();
                AffineTransform rotateTransform = new AffineTransform();
                rotateTransform.quadrantRotate(-1);
                ((Graphics2D) g).transform(rotateTransform);
                g.drawString(label, -strX, 20);
                ((Graphics2D) g).setTransform(t);

            }
View Full Code Here

Examples of java.awt.geom.AffineTransform.quadrantRotate()

        double scaleX = (double) w / imgWidth;
        double scaleY = (double) h / imgHeight;
        //r = 0;//Math.PI ;
        AffineTransform t = new AffineTransform();
        t.scale(scaleX, scaleY);
        t.quadrantRotate(d.value+1%4, imgWidth / 2, imgHeight / 2);
        //t.rotate(r, imgWidth / 2, imgHeight / 2);
        //t.rotate(r/180*Math.PI);



 
View Full Code Here

Examples of java.awt.geom.AffineTransform.quadrantRotate()

  if (orientation == 0) {
      destinationImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
  } else if (orientation == 3) {
      destinationImage = new BufferedImage(height, width, BufferedImage.TYPE_INT_RGB);
      transform.translate(0, sourceImage.getWidth(null));
      transform.quadrantRotate(-1);
  } else if (orientation == 6) {
      destinationImage = new BufferedImage(height, width, BufferedImage.TYPE_INT_RGB);
      transform.translate(sourceImage.getHeight(null), 0);
      transform.rotate(1);
  } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.