Package java.awt.geom

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


        2 * sashWidth, 2 * sashWidth,
        startAngle, extentAngle, Arc2D.PIE);
    AffineTransform transformation = new AffineTransform();
    transformation.translate(doorOrWindow.getX(), doorOrWindow.getY());
    transformation.rotate(doorOrWindow.getAngle());
    transformation.translate(modelMirroredSign * -doorOrWindow.getWidth() / 2, -doorOrWindow.getDepth() / 2);
    PathIterator it = arc.getPathIterator(transformation);
    GeneralPath sashShape = new GeneralPath();
    sashShape.append(it, false);
    return sashShape;
  }
View Full Code Here


      }
      if (bounds.width < size.width) {
        x += (size.width - bounds.width) / 2;
      }
      retVal.scale(bounds.width / originalDimension.getWidth(), bounds.height / originalDimension.getHeight());
      retVal.translate(x, y);
    }
    return retVal;
  }

  /**
 
View Full Code Here

      AffineTransform currentAf = properties.getAffineTransform();
      AffineTransform af = new AffineTransform();
      af.scale(properties.getAffineTransform().getScaleX(), currentAf.getScaleY());

      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());
      }
 
View Full Code Here

            AffineTransform trans = new AffineTransform();
            switch (orient) {
                case Up:
                    trans.concatenate(oldTransform);
                    trans.translate(x, y - 2);
                    trans.rotate(
                        Math.PI * 3 / 2, height / 2, width / 2);
                    g2d.setTransform(trans);
                    g2d.drawGlyphVector(
                        glyphs,
View Full Code Here

                        (width - height) / 2 + ascent
                    );
                    break;
                case Down:
                    trans.concatenate(oldTransform);
                    trans.translate(x, y + 2);
                    trans.rotate(
                        Math.PI / 2, height / 2, width / 2
                    );
                    g2d.setTransform(trans);
                    g2d.drawGlyphVector(
View Full Code Here

        for (int i = 0; i < charAttsList.size(); i++)
        {
            CharAttributes cf = (CharAttributes) charAttsList.get(i);
            TextLayout text = new TextLayout(cf.getChar() + "", getFont(cf.getName()), ctx); //gfx.getFontRenderContext());
            AffineTransform textAt = new AffineTransform();
            textAt.translate(curWidth, this.height - cf.getRise());
            if (cf.getRotation() != 0)
            {
                textAt.rotate(cf.getRotation());
            }
            if (cf.getShearX() > 0.0)
View Full Code Here

      graphic.setColor(Color.WHITE);
      graphic.fillRect(0, 0, (int)width, (int)height);
      graphic.scale(scale, scale);
      graphic.translate(-tl.getX()+dec, -tl.getY()+dec);

      aff.translate(0, 0);

      view.paint(graphic, null);
      view.flush();

      graphic2.setColor(Color.WHITE);
View Full Code Here

        RenderedImage source = renderedSource[res];
        double sx = (double)getWidth()/source.getWidth();
        double sy = (double)getHeight()/source.getHeight();

        AffineTransform transform = new AffineTransform();
        transform.translate(-source.getMinX(), -source.getMinY());
        transform.scale(sx, sy);
        transform.translate(getMinX(), getMinY());
        transform.preConcatenate(usr2dev);

        Interpolation interp =
View Full Code Here

        double sy = (double)getHeight()/source.getHeight();

        AffineTransform transform = new AffineTransform();
        transform.translate(-source.getMinX(), -source.getMinY());
        transform.scale(sx, sy);
        transform.translate(getMinX(), getMinY());
        transform.preConcatenate(usr2dev);

        Interpolation interp =
            Interpolation.getInstance(Interpolation.INTERP_NEAREST);
        if (hints != null) {
View Full Code Here

    for (CharAttributes cf : charAttsList)
    {
      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);
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.