Examples of createTransformedShape()


Examples of ae.java.awt.geom.AffineTransform.createTransformedShape()

        if (tx == 0 && ty == 0) {
            return cloneShape(s);
        }

        AffineTransform mat = AffineTransform.getTranslateInstance(tx, ty);
        return mat.createTransformedShape(s);
    }

    protected static Shape transformShape(AffineTransform tx, Shape clip) {
        if (clip == null) {
            return null;
View Full Code Here

Examples of com.google.code.appengine.awt.geom.AffineTransform.createTransformedShape()

        // if s == null the clip is reset to the imageBounds
        if (s == null && imageBounds != null) {
            s = new Rectangle(imageBounds);
            AffineTransform at = getTransform();
            if (at != null) {
                s = at.createTransformedShape(s);
            }
        }

        writePath(s);
        os.writeTag(new SelectClipPath(EMFConstants.RGN_COPY));
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.geom.AffineTransform.createTransformedShape()

    public abstract FontRenderContext getFontRenderContext();

    public Shape getGlyphOutline(int glyphIndex, float x, float y) {
        Shape initialShape = getGlyphOutline(glyphIndex);
        AffineTransform trans = AffineTransform.getTranslateInstance(x, y);
        return trans.createTransformedShape(initialShape);
    }

    public abstract Shape getGlyphVisualBounds(int glyphIndex);

    public abstract Shape getGlyphOutline(int glyphIndex);
View Full Code Here

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

        final BufferedImage img = new BufferedImage((int) width, (int) height, type);
        final Graphics2D g = (Graphics2D) img.getGraphics();
        g.transform(transform);
        final AffineTransform inv = transform.createInverse();
        Shape fillRect = new Rectangle2D.Double(0, 0, img.getWidth(), img.getHeight());
        fillRect = inv.createTransformedShape(fillRect);
        g.setPaint(paint);
        g.fill(fillRect);
        if (invert)
        {
          final AffineTransform tx = new AffineTransform();
View Full Code Here

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

     */
    final Rectangle2D bounds = shape.getBounds2D();
    final AffineTransform translateTransform
        = AffineTransform.getTranslateInstance(0 - bounds.getX(), 0 - bounds.getY());
    // apply normalisation translation ...
    final Shape translatedShape = translateTransform.createTransformedShape(shape);

    final AffineTransform scaleTransform = AffineTransform.getScaleInstance(scaleX, scaleY);
    // apply scaling ...
    final Shape scaledShape = scaleTransform.createTransformedShape(translatedShape);

View Full Code Here

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

    // apply normalisation translation ...
    final Shape translatedShape = translateTransform.createTransformedShape(shape);

    final AffineTransform scaleTransform = AffineTransform.getScaleInstance(scaleX, scaleY);
    // apply scaling ...
    final Shape scaledShape = scaleTransform.createTransformedShape(translatedShape);

    // now retranslate the shape to its original position ...
    final AffineTransform translateBackTransform =
        AffineTransform.getTranslateInstance(bounds.getX(), bounds.getY());
    return translateBackTransform.createTransformedShape(scaledShape);
View Full Code Here

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

    final Shape scaledShape = scaleTransform.createTransformedShape(translatedShape);

    // now retranslate the shape to its original position ...
    final AffineTransform translateBackTransform =
        AffineTransform.getTranslateInstance(bounds.getX(), bounds.getY());
    return translateBackTransform.createTransformedShape(scaledShape);
  }

  /**
   * Translates a se. Special care is taken to preserve the shape's original class, if the shape is a rectangle or a
   * line.
 
View Full Code Here

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

          retval.getX2() + x, retval.getY2() + y);
      return retval;
    }

    final AffineTransform af = AffineTransform.getTranslateInstance(x, y);
    return af.createTransformedShape(s);
  }


  /**
   * Calculate the clipping points of a line with a rectangle.
View Full Code Here

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

        AffineTransform affineTransform = new AffineTransform();
        affineTransform.setToTranslation(slopeEndposX, slopeEndposY);
        affineTransform.rotate(theta);
        Polygon first = new Polygon(new int[] {-5,0,-5},new int[] {2,0,-2},3);
        Shape firstArrow = affineTransform.createTransformedShape(first);
        g2.fill(firstArrow);
        g2.draw(firstArrow);

        // Restore old preferences
        g2.setColor(oldColor);
View Full Code Here

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

     * @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);
  }

    /**
     * Returns the position of the specified glyph relative to the
     * origin of this <code>GlyphVector</code>.
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.