Package com.google.code.appengine.awt.geom

Examples of com.google.code.appengine.awt.geom.AffineTransform


        this.doRestoreOnDispose = doRestoreOnDispose;

        deviceClip = (size != null ? new Rectangle(0, 0, size.width,
                size.height) : null);
        userClip = null;
        currentTransform = new AffineTransform();
        currentComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER);
        currentStroke = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE,
                BasicStroke.JOIN_MITER, 10.0f, null, 0.0f);

        super.setColor(Color.BLACK);
View Full Code Here


        size = new Dimension(graphics.size);

        deviceClip = new Rectangle(graphics.deviceClip);
        userClip = (graphics.userClip != null) ? new Area(graphics.userClip)
                : null;
        currentTransform = new AffineTransform(graphics.currentTransform);
        currentComposite = graphics.currentComposite;
        currentStroke = graphics.currentStroke;
        hints = graphics.hints;
    }
View Full Code Here

    }

    // NOTE: not tested yet!!!
    public void drawRenderableImage(RenderableImage image, AffineTransform xform) {
        drawRenderedImage(image.createRendering(new RenderContext(
                new AffineTransform(), getRenderingHints())), xform);
    }
View Full Code Here

            sx = flipHorizontal ? -1 * sx : sx;
            double sy = (double) height / srcHeight;
            sy = flipVertical ? -1 * sy : sy;

            writeImage(ImageUtilities.createRenderedImage(image, observer,
                    bgColor), new AffineTransform(sx, 0, 0, sy, tx, ty),
                    bgColor);
            return true;
        } catch (IOException e) {
            handleException(e);
            return false;
View Full Code Here

     * Get the current transform.
     *
     * @return current transform
     */
    public AffineTransform getTransform() {
        return new AffineTransform(currentTransform);
    }
View Full Code Here

     * @param y amount by which to translate
     */
    public void translate(double x, double y) {
        currentTransform.translate(x, y);
        try {
            writeTransform(new AffineTransform(1, 0, 0, 1, x, y));
        } catch (IOException e) {
            handleException(e);
        }
    }
View Full Code Here

     * @param theta radians over which to rotate
     */
    public void rotate(double theta) {
        currentTransform.rotate(theta);
        try {
            writeTransform(new AffineTransform(Math.cos(theta),
                    Math.sin(theta), -Math.sin(theta), Math.cos(theta), 0, 0));
        } catch (IOException e) {
            handleException(e);
        }
    }
View Full Code Here

     * @param sy amount used for scaling
     */
    public void scale(double sx, double sy) {
        currentTransform.scale(sx, sy);
        try {
            writeTransform(new AffineTransform(sx, 0, 0, sy, 0, 0));
        } catch (IOException e) {
            handleException(e);
        }
    }
View Full Code Here

     * @param shy amount for shearing
     */
    public void shear(double shx, double shy) {
        currentTransform.shear(shx, shy);
        try {
            writeTransform(new AffineTransform(1, shy, shx, 1, 0, 0));
        } catch (IOException e) {
            handleException(e);
        }
    }
View Full Code Here

s     *
     * @param transform to be written
     */
    protected void writeSetTransform(AffineTransform transform) throws IOException {
      try {
        AffineTransform deltaTransform = new AffineTransform(transform);
          deltaTransform.concatenate(oldTransform.createInverse());
        writeTransform(deltaTransform);
      } catch (NoninvertibleTransformException e) {
        // ignored...
        System.err.println("Warning: (ignored) Could not invert matrix: "+oldTransform);
      }
View Full Code Here

TOP

Related Classes of com.google.code.appengine.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.