Examples of AffineTransform


Examples of java.awt.geom.AffineTransform

    final float ascent = baseFont.getFontDescriptor(BaseFont.BBOXURY, textSpec.getFontSize());
    final float y2 = (float) (StrictGeomUtility.toExternalValue(posY) + ascent);
    final float y = globalHeight - y2;


    final AffineTransform affineTransform = textSpec.getGraphics().getTransform();
    final float translateX = (float) affineTransform.getTranslateX();

    if (baseFontRecord.isTrueTypeFont() && textSpec.isBold())
    {
      final float strokeWidth = textSpec.getFontSize() / 30.0f; // right from iText ...
      if (strokeWidth == 1)
View Full Code Here

Examples of java.awt.geom.AffineTransform

      if (StringUtils.isEmpty(tooltip))
      {
        continue;
      }

      final AffineTransform affineTransform = getGraphics().getTransform();
      final float translateX = (float) affineTransform.getTranslateX();
      final int x = (int) (translateX + StrictGeomUtility.toExternalValue(content.getX()));
      final int y = (int) StrictGeomUtility.toExternalValue(content.getY());
      final float[] translatedCoords = translateCoordinates(imageMapEntry.getAreaCoordinates(), x, y);

      final PolygonAnnotation polygonAnnotation = new PolygonAnnotation(writer, translatedCoords);
View Full Code Here

Examples of java.awt.geom.AffineTransform

    {
      return false;
    }

    final Rectangle2D.Double drawAreaBounds = new Rectangle2D.Double(x, y, width, height);
    final AffineTransform scaleTransform;

    final Graphics2D g2;
    if (shouldScale == false)
    {
      double deviceScaleFactor = 1;
View Full Code Here

Examples of java.awt.geom.AffineTransform

  {
    this.metaData = metaData;
    dg2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);

    this.transform = new AffineTransform();

    paint = Color.black;
    background = Color.white;
    setFont(new Font("sanserif", Font.PLAIN, 12));
    this.cb = cb;
View Full Code Here

Examples of java.awt.geom.AffineTransform

      return;
    }
    setFillPaint();
    setStrokePaint();

    final AffineTransform at = getTransform();
    final AffineTransform at2 = getTransform();
    at2.translate(x, y);
    at2.concatenate(font.getTransform());
    setTransform(at2);
    final AffineTransform inverse = this.normalizeMatrix();
    final AffineTransform flipper = FLIP_TRANSFORM;
    inverse.concatenate(flipper);
    final double[] mx = new double[6];
    inverse.getMatrix(mx);
    cb.beginText();
View Full Code Here

Examples of java.awt.geom.AffineTransform

  /**
   * @see Graphics2D#setTransform(AffineTransform)
   */
  public void setTransform(final AffineTransform t)
  {
    transform = new AffineTransform(t);
    this.stroke = transformStroke(originalStroke);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

  /**
   * @see Graphics2D#getTransform()
   */
  public AffineTransform getTransform()
  {
    return new AffineTransform(transform);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

  {
    final boolean antialias = RenderingHints.VALUE_TEXT_ANTIALIAS_ON.equals(getRenderingHint(
        RenderingHints.KEY_TEXT_ANTIALIASING));
    final boolean fractions = RenderingHints.VALUE_FRACTIONALMETRICS_ON.equals(getRenderingHint(
        RenderingHints.KEY_FRACTIONALMETRICS));
    return new FontRenderContext(new AffineTransform(), antialias, fractions);
  }
View Full Code Here

Examples of java.awt.geom.AffineTransform

   * @see Graphics#create()
   */
  public Graphics create()
  {
    final PdfGraphics2D g2 = new PdfGraphics2D();
    g2.transform = new AffineTransform(this.transform);
    g2.metaData = this.metaData;
    g2.paint = this.paint;
    g2.fillGState = this.fillGState;
    g2.strokeGState = this.strokeGState;
    g2.background = this.background;
View Full Code Here

Examples of java.awt.geom.AffineTransform

                           final ImageObserver observer)
  {
    waitForImage(img);
    final double scalex = width / (double) img.getWidth(observer);
    final double scaley = height / (double) img.getHeight(observer);
    final AffineTransform tx = AffineTransform.getTranslateInstance(x, y);
    tx.scale(scalex, scaley);
    return drawImage(img, null, tx, bgcolor, observer);
  }
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.