Package java.awt.geom

Examples of java.awt.geom.AffineTransform


   
    private void rotate(int degrees) {
        img = picture.getImage();
       
        BufferedImage src = Utilities.toBufferedImage(new DcImageIcon(img));
        AffineTransform at = new AffineTransform();
       
        at.rotate(Math.toRadians(degrees), src.getWidth() / 2.0, src.getHeight() / 2.0);
        AffineTransform translationTransform = findTranslation (at, src);
        at.preConcatenate(translationTransform);
        BufferedImage destinationBI = new AffineTransformOp(at, AffineTransformOp.TYPE_BICUBIC).filter(src, null);

        picture = new DcImageIcon(Utilities.getBytes(new DcImageIcon(destinationBI)));
        initialize();
View Full Code Here


      p2din = new Point2D.Double(0, bi.getHeight());
      p2dout = at.transform(p2din, null);
      double xtrans = p2dout.getX () ;

      AffineTransform tat = new AffineTransform();
      tat.translate(-xtrans, -ytrans);
     
      return tat;
    }   
View Full Code Here

        (int) (jasperPrint.getPageHeight() * realZoom) + 1,
        BufferedImage.TYPE_INT_RGB
        );
   
    Graphics2D grx = (Graphics2D) image.getGraphics();
    AffineTransform transform = new AffineTransform();
    transform.scale(realZoom, realZoom);
    grx.transform(transform);

    drawPageError(grx);
   
    return image;
View Full Code Here

  }

  protected void paintPageError(Graphics2D grx)
  {
    AffineTransform origTransform = grx.getTransform();
   
    AffineTransform transform = new AffineTransform();
    transform.translate(1, 1);
    transform.scale(realZoom, realZoom);
    grx.transform(transform);
   
    try
    {
      drawPageError(grx);
View Full Code Here

    }
  }

  public void render(Graphics2D grx, Rectangle2D rectangle)
  {
    AffineTransform origTransform = grx.getTransform();
    try
    {
      Dimension size = barcode.getSize();

      if (rotation != null)
View Full Code Here

    return component.getSize();
  }

  public void render(Graphics2D grx, Rectangle2D rectangle)
  {
    AffineTransform origTransform = grx.getTransform();
    try
    {
      Dimension size = component.getSize();

      grx.translate(rectangle.getX(), rectangle.getY());
View Full Code Here

  public void render(Graphics2D grx, Rectangle2D rectangle) throws JRException
  {
    ensureSvg();

    AffineTransform transform = ViewBox.getPreserveAspectRatioTransform(
        new float[]{0, 0, (float) documentSize.getWidth(), (float) documentSize.getHeight()},
        SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_NONE, true,
        (float) rectangle.getWidth(), (float) rectangle.getHeight());
    Graphics2D graphics = (Graphics2D) grx.create();
    graphics.translate(rectangle.getX(), rectangle.getY());
View Full Code Here

    return new JRGraphics2DExporter();
  }

  protected void paintPageError(Graphics2D grx)
  {
    AffineTransform origTransform = grx.getTransform();
   
    AffineTransform transform = new AffineTransform();
    transform.translate(1, 1);
    transform.scale(realZoom, realZoom);
    grx.transform(transform);
   
    try
    {
      drawPageError(grx);
View Full Code Here

        (int) (viewerContext.getJasperPrint().getPageHeight() * realZoom) + 1,
        BufferedImage.TYPE_INT_RGB
        );
   
    Graphics2D grx = (Graphics2D) image.getGraphics();
    AffineTransform transform = new AffineTransform();
    transform.scale(realZoom, realZoom);
    grx.transform(transform);

    drawPageError(grx);
   
    return image;
View Full Code Here

      BufferedImage dest = createImage(w, h);

      Graphics2D g2d = GraphicsUtil.createGraphics(dest);

      g2d.drawRenderedImage(rend, new AffineTransform());

      g2d.dispose();

      rend = null; // We're done with it...
      sendImage(dest);
View Full Code Here

TOP

Related Classes of java.awt.geom.AffineTransform

Copyright © 2018 www.massapicom. 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.