Package java.awt.geom

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


            if (at != null) {
                Dimension dim = getSize();
                int x = dim.width / 2;
                int y = dim.height / 2;
                AffineTransform t = AffineTransform.getTranslateInstance(x, y);
                t.scale(.5, .5);
                t.translate(-x, -y);
                t.concatenate(at);
                setRenderingTransform(t);
            }
        }
View Full Code Here


            // transform the AOI into the image's coordinate system
            aoi = Px.createTransformedShape(aoi).getBounds2D();
            AffineTransform Mx = new AffineTransform();
            double sx = width / aoi.getWidth();
            double sy = height / aoi.getHeight();
            Mx.scale(sx, sy);
            double tx = -aoi.getX();
            double ty = -aoi.getY();
            Mx.translate(tx, ty);
            // take the AOI transformation matrix into account
            // we apply first the preserveAspectRatio matrix
View Full Code Here

                                               GraphicsNode node) {

        AffineTransform Mx = new AffineTransform();
        Rectangle2D bounds = node.getGeometryBounds();
        Mx.translate(bounds.getX(), bounds.getY());
        Mx.scale(bounds.getWidth(), bounds.getHeight());
        Mx.concatenate(Tx);
        return Mx;
    }

    /**
 
View Full Code Here

            if (at != null) {
                Dimension dim = getSize();
                int x = dim.width / 2;
                int y = dim.height / 2;
                AffineTransform t = AffineTransform.getTranslateInstance(x, y);
                t.scale(2, 2);
                t.translate(-x, -y);
                t.concatenate(at);
                setRenderingTransform(t);
            }
        }
View Full Code Here

            if (at != null) {
                Dimension dim = getSize();
                int x = dim.width / 2;
                int y = dim.height / 2;
                AffineTransform t = AffineTransform.getTranslateInstance(x, y);
                t.scale(.5, .5);
                t.translate(-x, -y);
                t.concatenate(at);
                setRenderingTransform(t);
            }
        }
View Full Code Here

        double sx = bounds.getWidth() /(double)f.getWidth();
        double sy = bounds.getHeight()/(double)f.getHeight();
       
        // System.out.println("Scale: [" + sx + ", " + sy + "]");
        AffineTransform at = rc.getTransform();
        at.scale(sx, sy);

        // Map the area of interest to our input...
        Shape aoi = rc.getAreaOfInterest();
        if (aoi != null) {
            AffineTransform invAt = AffineTransform.getScaleInstance
View Full Code Here

    /**
     * Implements {@link SVGMatrix#scale(float)}.
     */
    public SVGMatrix scale(float scaleFactor) {
        AffineTransform tr = (AffineTransform)getAffineTransform().clone();
        tr.scale(scaleFactor, scaleFactor);
        return new SVGOMMatrix(tr);
    }

    /**
     * Implements {@link SVGMatrix#scaleNonUniform(float,float)}.
View Full Code Here

    /**
     * Implements {@link SVGMatrix#scaleNonUniform(float,float)}.
     */
    public SVGMatrix scaleNonUniform (float scaleFactorX, float scaleFactorY) {
        AffineTransform tr = (AffineTransform)getAffineTransform().clone();
        tr.scale(scaleFactorX, scaleFactorY);
        return new SVGOMMatrix(tr);
    }

    /**
     * Implements {@link SVGMatrix#rotate(float)}.
View Full Code Here

                    (getGlyphPosition(i).getX(),
                     getGlyphPosition(i).getY());

                if (glyphTransform != null)
                    tr.concatenate(glyphTransform);
                tr.scale(scaleFactor, scaleFactor);

                tempLogicalBounds[i] = tr.createTransformedShape(glyphBounds);

                Point2D tp1 = new Point2D.Double();
                Point2D tp2 = new Point2D.Double();
View Full Code Here

                                               GraphicsNode node) {

        AffineTransform Mx = new AffineTransform();
        Rectangle2D bounds = node.getGeometryBounds();
        Mx.translate(bounds.getX(), bounds.getY());
        Mx.scale(bounds.getWidth(), bounds.getHeight());
        Mx.concatenate(Tx);
        return Mx;
    }

    /**
 
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.