Examples of shear()


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

      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

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

      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

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

      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

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

    public void testAffineTransform() throws FactoryException, TransformException {
        for (int pass=0; pass<10; pass++) {
            final AffineTransform transform = new AffineTransform();
            transform.rotate(Math.PI*random.nextDouble(), 100*random.nextDouble(), 100*random.nextDouble());
            transform.scale       (2*random.nextDouble(),   2*random.nextDouble());
            transform.shear       (2*random.nextDouble(),   2*random.nextDouble());
            transform.translate (100*random.nextDouble(), 100*random.nextDouble());
            compareTransforms("AffineTransform", new MathTransform[] {
                new ProjectiveTransform(new GeneralMatrix(transform)),
                new AffineTransform2D(transform)
            });
View Full Code Here

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

            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

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

      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);
      this.width += (int)shape.getBounds2D().getWidth();
      if (this.height < (int)shape.getBounds2D().getHeight() + rise)
      {
        this.height = (int)shape.getBounds2D().getHeight() + rise;
View Full Code Here

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

        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

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

                        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

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

            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

Examples of org.apache.batik.ext.awt.g2d.GraphicContext.shear()

    public void testSVGTransform() throws Exception {
        GraphicContext gc = new GraphicContext();
        gc.translate(20, 20);
        gc.rotate(Math.PI/4);
        gc.shear(.5, .5);
        gc.scale(20, 20);

        AffineTransform txf = new AffineTransform();
        txf.translate(60, 60);
        gc.transform(txf);
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.