Package java.awt.geom

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


        if(done || somebits) {
            int w = srcSurf.getWidth();
            int h = srcSurf.getHeight();
            AffineTransform xform = (AffineTransform) transform.clone();
            xform.concatenate(trans);
            blitter.blit(0, 0, srcSurf, 0, 0, dstSurf, w, h, xform, composite,
                    null, clip);
        }
        return done;
    }
View Full Code Here


    final AffineTransform oldTransform = g2d.getTransform();

    g2d.setColor(getForeground());

    final AffineTransform trans = new AffineTransform();
    trans.concatenate(oldTransform);
    trans.translate(x, y - 2);
    trans.rotate(Math.PI * 3 / 2, height / 2, width / 2);
    g2d.setTransform(trans);
    g2d.drawString(text, (height - width) / 2, (width - height) / 2 + ascent);
    g2d.setTransform(oldTransform);
View Full Code Here

      g2d.drawString(text, 2, ascent);
    }
    else if (rotate == RotateTextIcon.CW)
    {
      final AffineTransform trans = new AffineTransform();
      trans.concatenate(oldTransform);
      trans.translate(0, 2);
      trans.rotate(Math.PI / 2, height / 2, width / 2);
      g2d.setTransform(trans);
      g2d.drawString(text, (height - width) / 2, (width - height) / 2 + ascent);
    }
View Full Code Here

      g2d.drawString(text, (height - width) / 2, (width - height) / 2 + ascent);
    }
    else if (rotate == RotateTextIcon.CCW)
    {
      final AffineTransform trans = new AffineTransform();
      trans.concatenate(oldTransform);
      trans.translate(0, -2);
      trans.rotate(Math.PI * 3 / 2, height / 2, width / 2);
      g2d.setTransform(trans);
      g2d.drawString(text, (height - width) / 2, (width - height) / 2 + ascent);
    }
View Full Code Here

    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];
View Full Code Here

    AffineTransform result = AffineTransform.getTranslateInstance(0, 0);
    result.getMatrix(mx);
    mx[3] = -1;
    mx[5] = height;
    result = new AffineTransform(mx);
    result.concatenate(transform);
    return result;
  }


View Full Code Here

                         * and then rotate the text before computing the bounds. The scale results in some whitespace around
                         * the unrotated top and bottom of the text that normally wouldn't be present if unscaled, but
                         * is added by the standard Excel autosize.
                         */
                        AffineTransform trans = new AffineTransform();
                        trans.concatenate(AffineTransform.getRotateInstance(style.getRotation()*2.0*Math.PI/360.0));
                        trans.concatenate(
                        AffineTransform.getScaleInstance(1, fontHeightMultiple)
                        );
                        width = Math.max(width, ((layout.getOutline(trans).getBounds().getWidth() / colspan) / defaultCharWidth) + cell.getCellStyle().getIndention());
                    } else {
View Full Code Here

                         * the unrotated top and bottom of the text that normally wouldn't be present if unscaled, but
                         * is added by the standard Excel autosize.
                         */
                        AffineTransform trans = new AffineTransform();
                        trans.concatenate(AffineTransform.getRotateInstance(style.getRotation()*2.0*Math.PI/360.0));
                        trans.concatenate(
                        AffineTransform.getScaleInstance(1, fontHeightMultiple)
                        );
                        width = Math.max(width, ((layout.getOutline(trans).getBounds().getWidth() / colspan) / defaultCharWidth) + cell.getCellStyle().getIndention());
                    } else {
                        width = Math.max(width, ((layout.getBounds().getWidth() / colspan) / defaultCharWidth) + cell.getCellStyle().getIndention());
View Full Code Here

                         * and then rotate the text before computing the bounds. The scale results in some whitespace around
                         * the unrotated top and bottom of the text that normally wouldn't be present if unscaled, but
                         * is added by the standard Excel autosize.
                         */
                        AffineTransform trans = new AffineTransform();
                        trans.concatenate(AffineTransform.getRotateInstance(style.getRotation()*2.0*Math.PI/360.0));
                        trans.concatenate(
                        AffineTransform.getScaleInstance(1, fontHeightMultiple)
                        );
                        width = Math.max(width, ((layout.getOutline(trans).getBounds().getWidth() / colspan) / defaultCharWidth) + cell.getCellStyle().getIndention());
                    } else {
View Full Code Here

                         * the unrotated top and bottom of the text that normally wouldn't be present if unscaled, but
                         * is added by the standard Excel autosize.
                         */
                        AffineTransform trans = new AffineTransform();
                        trans.concatenate(AffineTransform.getRotateInstance(style.getRotation()*2.0*Math.PI/360.0));
                        trans.concatenate(
                        AffineTransform.getScaleInstance(1, fontHeightMultiple)
                        );
                        width = Math.max(width, ((layout.getOutline(trans).getBounds().getWidth() / colspan) / defaultCharWidth) + cell.getCellStyle().getIndention());
                    } else {
                        width = Math.max(width, ((layout.getBounds().getWidth() / colspan) / defaultCharWidth) + cell.getCellStyle().getIndention());
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.