Examples of preConcatenate()


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

        Color[] colors = paint.getColors();
        int numStops = colors.length;
        Point2D pt1 = paint.getStartPoint();
        Point2D pt2 = paint.getEndPoint();
        AffineTransform at = paint.getTransform();
        at.preConcatenate(sg2d.transform);

        if (!linear && numStops == 2 &&
            paint.getCycleMethod() != CycleMethod.REPEAT)
        {
            // delegate to the optimized two-color gradient codepath
View Full Code Here

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

            Color bkg) throws IOException {
        os.writeTag(new SaveDC());

        AffineTransform imageTransform = new AffineTransform(
            1.0, 0.0, 0.0, -1.0, 0.0, image.getHeight());
        imageTransform.preConcatenate(xform);
        writeTransform(imageTransform);

        BufferedImage bufferedImage = ImageUtilities.createBufferedImage(
            image, null, null);
        AlphaBlend alphaBlend = new AlphaBlend(
View Full Code Here

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

        while (it.hasNext()) {
            Contour c = (Contour) it.next();
            AffineTransform combined = transform;
            if (c.getTranslation() != null) {
                combined = AffineTransform.getTranslateInstance(c.getTranslation().getX(), c.getTranslation().getY());
                combined.preConcatenate(transform);
            }
            Rectangle2D translatedRect = rect;
            if (!combined.isIdentity()) {
                try {
                    AffineTransform inverse = combined.createInverse();
View Full Code Here

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

        ); */

        // We use JAI to do the scaling because drawImage with a transform sometimes fails on windows
        if (scale > 0) {
            AffineTransform transform = AffineTransform.getScaleInstance(scale, scale);
            transform.preConcatenate(AffineTransform.getTranslateInstance(imageBounds.x, imageBounds.y));
            RenderingHints formatHints = new RenderingHints(JAI.KEY_BORDER_EXTENDER,
                                                            BorderExtender.createInstance(BorderExtender.BORDER_COPY));
            Interpolation interp = Interpolation.getInstance(Interpolation.INTERP_BILINEAR);
            ParameterBlock params = new ParameterBlock();
            params.addSource(image);
View Full Code Here

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

    // Also used from DocPanel to forward mouse motion to the Previews.
    AffineTransform getOverlayTransform() {
        AffineTransform overlayXform = overlay.getTransform();
        AffineTransform totalXform = (AffineTransform) xform.clone();
        totalXform.preConcatenate(overlayXform);
        return totalXform;
    }

    private void setUnderlayBounds(Rectangle bounds) {
        if (bounds.equals(underlayBounds)) {
View Full Code Here

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

        // Scale
        if (scaleFactor < 1 || !isInputTransform) {
            float scaleX = (float) Math.floor(scaleFactor * sourceBounds.width) / (float) sourceBounds.width;
            float scaleY = (float) Math.floor(scaleFactor * sourceBounds.height) / (float) sourceBounds.height;
            transform.preConcatenate(AffineTransform.getScaleInstance(scaleX, scaleY));
        }

        // Rotate
        if (cropBounds.getAngle() != 0) {
            Rectangle2D bounds = transform.createTransformedShape(sourceBounds).getBounds2D();
View Full Code Here

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

        if (cropBounds.getAngle() != 0) {
            Rectangle2D bounds = transform.createTransformedShape(sourceBounds).getBounds2D();

            Point2D center = new Point2D.Double(bounds.getCenterX(), bounds.getCenterY());

            transform.preConcatenate(AffineTransform.getRotateInstance(-cropBounds.getAngle(),
                                                                       center.getX(),
                                                                       center.getY()));

            bounds = transform.createTransformedShape(sourceBounds).getBounds2D();
            transform.preConcatenate(AffineTransform.getTranslateInstance(-bounds.getMinX(), -bounds.getMinY()));
View Full Code Here

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

            transform.preConcatenate(AffineTransform.getRotateInstance(-cropBounds.getAngle(),
                                                                       center.getX(),
                                                                       center.getY()));

            bounds = transform.createTransformedShape(sourceBounds).getBounds2D();
            transform.preConcatenate(AffineTransform.getTranslateInstance(-bounds.getMinX(), -bounds.getMinY()));
        }

        // Crop
        if (!cropBounds.isAngleOnly()) {
            CropBounds actualCropBounds = CropBounds.transform(transform, cropBounds);
View Full Code Here

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

        if (!cropBounds.isAngleOnly()) {
            CropBounds actualCropBounds = CropBounds.transform(transform, cropBounds);

            Point2D cropUpperLeft = actualCropBounds.getUpperLeft();

            transform.preConcatenate(AffineTransform.getTranslateInstance(-cropUpperLeft.getX(),
                                                                          -cropUpperLeft.getY()));
        }

        return transform;
    }
View Full Code Here

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

        }

        final AffineTransform af = transform;
        final double ty = af.getTranslateY();
        final double select = -scrollBar.getSelection();
        af.preConcatenate(AffineTransform.getTranslateInstance(0, select - ty));
        transform = af;
        syncScrollBars();
    }

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