Package java.awt.geom

Examples of java.awt.geom.AffineTransform


      default :
      {
      }
    }

    AffineTransform atrans = new AffineTransform();
    atrans.rotate(angle, textRenderer.getX(), jasperPrint.getPageHeight() - textRenderer.getY());
    pdfContentByte.transform(atrans);

    if (text.getModeValue() == ModeEnum.OPAQUE)
    {
      Color backcolor = text.getBackcolor();
      pdfContentByte.setRGBColorFill(
        backcolor.getRed(),
        backcolor.getGreen(),
        backcolor.getBlue()
        );
      pdfContentByte.rectangle(
        textRenderer.getX() + xFillCorrection,
        jasperPrint.getPageHeight() - textRenderer.getY() + yFillCorrection,
        textRenderer.getWidth(),
        - textRenderer.getHeight()
        );
      pdfContentByte.fill();
    }

    if (styledText.length() > 0)
    {
      tagHelper.startText();
     
      /*   */
      textRenderer.render();

      tagHelper.endText();
    }

    atrans = new AffineTransform();
    atrans.rotate(-angle, textRenderer.getX(), jasperPrint.getPageHeight() - textRenderer.getY());
    pdfContentByte.transform(atrans);

    /*   */
    exportBox(
      text.getLineBox(),
 
View Full Code Here


     *   of glyphs in this <code>GlyphVector</code>
     * @since 1.4
     */
    public Shape getGlyphOutline(int glyphIndex, float x, float y) {
  Shape s = getGlyphOutline(glyphIndex);
  AffineTransform at = AffineTransform.getTranslateInstance(x,y);
  return at.createTransformedShape(s);
  }
View Full Code Here

                }
            }
        }

        if (dx != 0 || dy != 0) {
            AffineTransform tx = AffineTransform.getTranslateInstance(dx, dy);
            result = (GeneralPath)tx.createTransformedShape(result);
        }
        LayoutPathImpl lp = textLine.getLayoutPath();
        if (lp != null) {
            result = (GeneralPath)lp.mapShape(result);
        }
View Full Code Here

        // copy some flags
        this.colorSpace = colorSpace;
        this.cycleMethod = cycleMethod;

        // copy the gradient transform
        this.gradientTransform = new AffineTransform(gradientTransform);

        // determine transparency
        boolean opaque = true;
        for (int i = 0; i < colors.length; i++){
            opaque = opaque && (colors[i].getAlpha() == 0xff);
View Full Code Here

     * Returns a copy of the transform applied to the gradient.
     *
     * @return a copy of the transform applied to the gradient
     */
    public final AffineTransform getTransform() {
        return new AffineTransform(gradientTransform);
    }
View Full Code Here

            throw new NullPointerException("RenderingHints cannot be null");
        }

        // The inverse transform is needed to go from device to user space. 
        // Get all the components of the inverse transform matrix.
        AffineTransform tInv;
        try {
            // the following assumes that the caller has copied the incoming
            // transform and is not concerned about it being modified
            t.invert();
            tInv = t;
        } catch (NoninvertibleTransformException e) {
            // just use identity transform in this case; better to show
            // (incorrect) results than to throw an exception and/or no-op
            tInv = new AffineTransform();
        }
        double m[] = new double[6];
        tInv.getMatrix(m);
        a00 = (float)m[0];
        a10 = (float)m[1];
        a01 = (float)m[2];
        a11 = (float)m[3];
        a02 = (float)m[4];
View Full Code Here

     */
    public FontRenderContext(AffineTransform tx,
                            boolean isAntiAliased,
                            boolean usesFractionalMetrics) {
        if (tx != null && !tx.isIdentity()) {
            this.tx = new AffineTransform(tx);
        }
  if (isAntiAliased) {
      aaHintValue = VALUE_TEXT_ANTIALIAS_ON;
  } else {
      aaHintValue = VALUE_TEXT_ANTIALIAS_OFF;
View Full Code Here

     * legal values.
     * @since 1.6
     */
    public FontRenderContext(AffineTransform tx, Object aaHint, Object fmHint){
        if (tx != null && !tx.isIdentity()) {
            this.tx = new AffineTransform(tx);
        }
  try {
      if (KEY_TEXT_ANTIALIASING.isCompatibleValue(aaHint)) {
    aaHintValue = aaHint;
      } else {
View Full Code Here

    *   @return the <code>AffineTransform</code> of this
    *    <code>FontRenderContext</code>.
    *   @see AffineTransform
    */
    public AffineTransform getTransform() {
        return (tx == null) ? new AffineTransform() : new AffineTransform(tx);
    }
View Full Code Here

     * @param transform the specified {@link AffineTransform} to be wrapped,
     * or null.
     */
    public TransformAttribute(AffineTransform transform) {
        if (transform != null && !transform.isIdentity()) {
            this.transform = new AffineTransform(transform);
        }
    }
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.