Package java.awt.geom

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


      if (currentAf.getTranslateX() != 0 || currentAf.getTranslateY() != 0) {
          af.translate(r.nextDouble() * currentAf.getTranslateX(), r.nextDouble() * currentAf.getTranslateY());
      }

      if (currentAf.getShearX() != 0 || currentAf.getShearY() != 0) {
          af.shear(r.nextDouble() * currentAf.getShearX(), r.nextDouble() * currentAf.getShearY());
      }

      if (properties.getMaxRotationAngle() != 0) {
          af.rotate(r.nextDouble() / 360);
      }
View Full Code Here


                        new FontRenderContext(null, config.isFontAntialiasing(), false));
                textAt = new AffineTransform();
                if (config.getTextRotation() > 0)
                    textAt.rotate(dRotation);
                if (config.getTextShear() > 0.0)
                    textAt.shear(shearX, shearY);               
            }
            else
            {
                CharAttributes cf = new CharAttributes(chars[i], fontName, 0, rise, 0.0, 0.0);
                charAttsList.add(cf);               
View Full Code Here

            if (cf.getRotation() != 0)
            {
                textAt.rotate(cf.getRotation());
            }
            if (cf.getShearX() > 0.0)
                textAt.shear(cf.getShearX(), cf.getShearY());
            Shape shape = text.getOutline(textAt);
            curWidth += shape.getBounds().getWidth() + config.getTextSpacing();
            if (config.isUseImageBackground())
                gfx.setColor(Color.BLACK);
            else
View Full Code Here

      charAttsList.add(cf);
      text = new TextLayout(ch + "", getFont(fontName), new FontRenderContext(null, false,
        false));
      textAt = new AffineTransform();
      textAt.rotate(rotation);
      textAt.shear(shearX, shearY);
      shape = text.getOutline(textAt);
      width += (int) shape.getBounds2D().getWidth();
      if (height < (int) shape.getBounds2D().getHeight() + rise)
      {
        height = (int) shape.getBounds2D().getHeight() + rise;
View Full Code Here

      text = new TextLayout(cf.getChar() + "", getFont(cf.getName()),
        gfx.getFontRenderContext());
      textAt = new AffineTransform();
      textAt.translate(curWidth, height - cf.getRise());
      textAt.rotate(cf.getRotation());
      textAt.shear(cf.getShearX(), cf.getShearY());
      shape = text.getOutline(textAt);
      curWidth += shape.getBounds().getWidth();
      gfx.setXORMode(Color.BLACK);
      gfx.fill(shape);
    }
View Full Code Here

      charAttsList.add(cf);
      text = new TextLayout(ch + "", getFont(fontName), new FontRenderContext(null, false,
        false));
      textAt = new AffineTransform();
      textAt.rotate(rotation);
      textAt.shear(shearX, shearY);
      shape = text.getOutline(textAt);
      width += (int) shape.getBounds2D().getWidth();
      if (height < (int) shape.getBounds2D().getHeight() + rise)
      {
        height = (int) shape.getBounds2D().getHeight() + rise;
View Full Code Here

      text = new TextLayout(cf.getChar() + "", getFont(cf.getName()),
        gfx.getFontRenderContext());
      textAt = new AffineTransform();
      textAt.translate(curWidth, height - cf.getRise());
      textAt.rotate(cf.getRotation());
      textAt.shear(cf.getShearX(), cf.getShearY());
      shape = text.getOutline(textAt);
      curWidth += shape.getBounds().getWidth();
      gfx.setXORMode(Color.BLACK);
      gfx.fill(shape);
    }
View Full Code Here

            Area area = new Area(parentMask);
            Area clip = new Area(parentMask);

            AffineTransform tx = new AffineTransform();
            tx.translate(Math.sin(ANGLE)*getOwner().getHeight(), 0);
            tx.shear(-Math.tan(ANGLE), 0);
            tx.scale(1, YSCALE);
            tx.translate(0, (1-YSCALE)*getOwner().getHeight());
            area.transform(tx);
            tx = new AffineTransform();
            tx.translate(-OFFSET.x, -OFFSET.y);
View Full Code Here

      charAttsList.add(cf);
      text = new TextLayout(chars[i] + "", getFont(fontName), new FontRenderContext(null,
        false, false));
      textAt = new AffineTransform();
      textAt.rotate(rotation);
      textAt.shear(shearX, shearY);
      shape = text.getOutline(textAt);
      width += (int)shape.getBounds2D().getWidth();
      if (height < (int)shape.getBounds2D().getHeight() + rise)
      {
        height = (int)shape.getBounds2D().getHeight() + rise;
View Full Code Here

        TextLayout text = new TextLayout(cf.getChar() + "", getFont(cf.getName()),
          gfx.getFontRenderContext());
        AffineTransform textAt = new AffineTransform();
        textAt.translate(curWidth, height - cf.getRise());
        textAt.rotate(cf.getRotation());
        textAt.shear(cf.getShearX(), cf.getShearY());
        Shape shape = text.getOutline(textAt);
        curWidth += shape.getBounds().getWidth();
        gfx.setXORMode(Color.BLACK);
        gfx.fill(shape);
      }
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.