Package java.awt.geom

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


        {
          if (AWT_SUPERSCRIPT_FIX_ENABLED && atrans != null)
          {
            double y = atrans.getTranslateY();
            atrans = new AffineTransform();
            atrans.translate(0, - y);
            awtFont = awtFont.deriveFont(atrans);
            atrans = null;
          }
          Integer superscript = (Integer)attrs.get(TextAttribute.SUPERSCRIPT);
          if (TextAttribute.SUPERSCRIPT_SUPER.equals(superscript))
View Full Code Here


          Integer superscript = (Integer)attrs.get(TextAttribute.SUPERSCRIPT);
          if (TextAttribute.SUPERSCRIPT_SUPER.equals(superscript))
          {
            atrans = new AffineTransform();
            atrans.scale(2 / 3d, 2 / 3d);
            atrans.translate(0, - awtFont.getSize() / 2f);
            awtFont = awtFont.deriveFont(atrans);
          }
          else if (TextAttribute.SUPERSCRIPT_SUB.equals(superscript))
          {
            atrans = new AffineTransform();
View Full Code Here

          }
          else if (TextAttribute.SUPERSCRIPT_SUB.equals(superscript))
          {
            atrans = new AffineTransform();
            atrans.scale(2 / 3d, 2 / 3d);
            atrans.translate(0, awtFont.getSize() / 2f);
            awtFont = awtFont.deriveFont(atrans);
          }
          awtAttributedString.addAttribute(TextAttribute.FONT, awtFont, iterator.getIndex(), runLimit);
        }
       
View Full Code Here

    double ty = (imageBounds.getY() - applicationBounds.getMinY());
    BufferedImage image = ImageIO.read(new ByteArrayInputStream(imageResult.getImage()));
    double scaleX = imageBounds.getWidth() / image.getWidth();
    double scaleY = imageBounds.getHeight() / image.getHeight();
    AffineTransform transform = new AffineTransform();
    transform.translate(tx, ty);
    transform.scale(scaleX, scaleY);
    if (log.isDebugEnabled()) {
      log.debug("adding image, width=" + image.getWidth() + ",height=" + image.getHeight() + ",x=" + tx + ",y="
          + ty);
    }
View Full Code Here

    //grx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
    grx.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    grx.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);

    AffineTransform atrans = new AffineTransform();
    atrans.translate(globalOffsetX, globalOffsetY);
    atrans.scale(zoom, zoom);
    grx.transform(atrans);

    java.util.List pages = jasperPrint.getPages();
    if (pages != null)
View Full Code Here

      AffineTransform tx = new AffineTransform();

      switch (rotation) {
      case CLOCKWISE:
        // Reminder: newWidth == result.getHeight() at this point
        tx.translate(newWidth, 0);
        tx.rotate(Math.toRadians(90));

        break;

      case COUNTER_CLOCKWISE:
View Full Code Here

        break;

      case COUNTER_CLOCKWISE:
        // Reminder: newHeight == result.getWidth() at this point
        tx.translate(0, newHeight);
        tx.rotate(Math.toRadians(-90));
        break;

      case FLIP:
        /*
 
View Full Code Here

         * from the defaults we set above.
         */
        newWidth = result.getWidth();
        newHeight = result.getHeight();

        tx.translate(newWidth, newHeight);
        tx.rotate(Math.toRadians(180));
        break;
      }

      /*
 
View Full Code Here

        if(textScanner == null)
        {state.setCharSpace(newCharSpace);}
        charSpace = newCharSpace * scale;
      }
      tm = (AffineTransform)state.getTlm().clone();
      tm.translate(0, state.getLead());
    }
    else
    {tm = (AffineTransform)state.getTm().clone();}

    for(Object textElement : getValue())
View Full Code Here

          rotatedCanvasSize.getWidth() / contentBox.getWidth(),
          rotatedCanvasSize.getHeight() / contentBox.getHeight()
          );

        // Origin alignment.
        initialCtm.translate(-contentBox.getMinX(), -contentBox.getMinY());
      }
      return initialCtm;
    }

    /**
 
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.