Examples of createTransformedShape()


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

        // Map the destination bounds to rendered coordinates. This method
        // will cause extra data to be present if there is any rotation or
        // shear.
        AffineTransform tf = renderContext.getTransform();
        Rectangle2D rect = tf.createTransformedShape(dstRect2D).getBounds2D();

        // Make sure that the rendered rectangle is non-empty.
        if(rect.getWidth() < 1.0 || rect.getHeight() < 1.0) {
            double w = Math.max(rect.getWidth(), 1.0);
            double h = Math.max(rect.getHeight(), 1.0);
View Full Code Here

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

            rgn = new Rectangle2D.Float(0.0F, 0.0F, aspectRatio, 1.0F);
        }

        // Apply the renderable-to-rendered mapping to the renderable
        // destination region of interest.
        Rectangle dstROI = at.createTransformedShape(rgn).getBounds();

        // Calculate the pure scale portion of the
        // renderable-to-rendered mapping.
        AffineTransform scale =
            AffineTransform.getScaleInstance(dstROI.getWidth()/
View Full Code Here

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

        int height;
        if(at.isIdentity()) { // Default rendering.
            AffineTransform afn =
                (AffineTransform)paramBlock.getObjectParameter(6);
            Rectangle2D bounds =
                afn.createTransformedShape(bounds2D).getBounds2D();
            double H = maxHeight*bounds.getHeight();
            double W = maxHeight*bounds.getWidth();
            double m = Math.max(H, W/aspectRatioSource);
            height = (int)(m + 0.5);
            width = (int)(aspectRatioSource*m + 0.5);
View Full Code Here

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

                // from source renderable coordinates to destination
                // rendered coordinates.
                at.preConcatenate(renderContext.getTransform());

                // Create an ROI in destination rendered space.
                ROIShape roi = new ROIShape(at.createTransformedShape(rgn));

                // Create a TiledImage to contain the masked result.
                TiledImage ti = new TiledImage(rendering.getMinX(),
                                               rendering.getMinY(),
                                               rendering.getWidth(),
View Full Code Here

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

        af.translate(getAnchorX(),getAnchorY());
        af.rotate(Math.toRadians(getRotate()));
        af.scale(getScaleX(), getScaleY());
        af.translate(-getAnchorX(),-getAnchorY());

        Shape sh = af.createTransformedShape(r);
        Rectangle2D bds = sh.getBounds2D();
        return Util.toBounds(bds);
    }

    @Override
View Full Code Here

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

        af.translate(getTranslateX(),getTranslateY());
        af.translate(getAnchorX(),getAnchorY());
        af.rotate(Math.toRadians(getRotate()));
        af.scale(getScaleX(), getScaleY());
        af.translate(-getAnchorX(),-getAnchorY());
        Shape sh = af.createTransformedShape(poly);
        Rectangle2D bds = sh.getBounds2D();
        return Util.toBounds(bds);
    }

    @Override
View Full Code Here

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

            af.translate(getAnchorX(),getAnchorY());
            af.rotate(Math.toRadians(getRotate()));
            af.scale(getScaleX(), getScaleY());
            af.translate(-getAnchorX(),-getAnchorY());

            Shape sh = af.createTransformedShape(r);
            Rectangle2D bds = sh.getBounds2D();
            return Util.toBounds(bds);
        }

        @Override
View Full Code Here

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

        af.translate(getAnchorX(),getAnchorY());
        af.rotate(Math.toRadians(getRotate()));
        af.scale(getScaleX(), getScaleY());
        af.translate(-getAnchorX(),-getAnchorY());

        Shape sh = af.createTransformedShape(r);
        Rectangle2D bds = sh.getBounds2D();
        return Util.toBounds(bds);
    }

    @Override
View Full Code Here

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

        af.translate(getTranslateX(),getTranslateY());
        af.translate(getAnchorX(),getAnchorY());
        af.rotate(Math.toRadians(getRotate()));
        af.scale(getScaleX(), getScaleY());
        af.translate(-getAnchorX(),-getAnchorY());
        return af.createTransformedShape(sh);
    }

    public static interface SShapeListener {
        public void changed();
    }
View Full Code Here

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

        af.translate(getTranslateX(),getTranslateY());
        af.translate(getAnchorX(),getAnchorY());
        af.rotate(Math.toRadians(getRotate()));
        af.scale(getScaleX(), getScaleY());
        af.translate(-getAnchorX(),-getAnchorY());
        Shape sh = af.createTransformedShape(r);
        Rectangle2D bds = sh.getBounds2D();
        return Util.toBounds(bds);
    }

    @Override
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.