Package java.awt.geom

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


           
            if (ch == ' ') continue;
           
            info = glyphHash.containsKey(ch) ? (DLInfo)glyphHash.get(ch) : null;           
            try {
                fontAT.inverseTransform(gv.getGlyphPosition(i), pos);
            } catch (NoninvertibleTransformException e) {               
            }
           
            gl.glTranslated(pos.x, pos.y, 0);
            if (info == null || !info.isValid()) {               
View Full Code Here


        Point.Float pos = new Point.Float();
        Paint paint = g.getPaint();
        boolean isAntialias = g.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING) == RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
       
        try {
            fontAT.inverseTransform(new Point.Double(x + fontAT.getTranslateX(), y + fontAT.getTranslateY()), pos);
        } catch (NoninvertibleTransformException e) {  
//          TODO determinant equals 0 => point or line
            g.fill(font.createGlyphVector(g.getFontRenderContext(), str).getOutline(x, y));
            return;
        }
View Full Code Here

        AffineTransform fontAT = (AffineTransform)font.getTransform().clone();
        Point.Float pos = new Point.Float();
        boolean isAntialias = g.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING) == RenderingHints.VALUE_TEXT_ANTIALIAS_ON;  
       
        try {
            fontAT.inverseTransform(new Point.Double(x + fontAT.getTranslateX(), y + fontAT.getTranslateY()), pos);
        } catch (NoninvertibleTransformException e) {
            //TODO determinant equals 0 => point or line
            g.fill(gv.getOutline(x, y));
            return;
        }
View Full Code Here

                continue;
            }
           
            final DLInfo info = glyphHash.containsKey(ch) ? (DLInfo)glyphHash.get(ch) : null;
            try {
                fontAT.inverseTransform(gv.getGlyphPosition(i), pos);
            } catch (NoninvertibleTransformException e) {               
            }
           
            gl.glTranslated(pos.x, pos.y, 0);
            if (info == null || !info.isValid()) {               
View Full Code Here

                    // Transform location into shape coordinates
                    AffineTransform affineTransform = shape.getTransforms().getAffineTransform();
                    java.awt.Point location = new java.awt.Point(x - origin.x, y - origin.y);

                    try {
                        affineTransform.inverseTransform(location, location);
                        if (shape.contains(location.x, location.y)) {
                            break;
                        }
                    } catch (NoninvertibleTransformException exception) {
                        // No-op
View Full Code Here

                float y2 = element[j][5];

                try {
                    assertEquals(
                            new Point2D.Double(x2, y2),
                            at.inverseTransform(new Point2D.Double(x1, y1), null));
                    assertEquals(
                            new Point2D.Float(x2, y2),
                            at.inverseTransform(new Point2D.Float(x1, y1), null));

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

                    assertEquals(
                            new Point2D.Double(x2, y2),
                            at.inverseTransform(new Point2D.Double(x1, y1), null));
                    assertEquals(
                            new Point2D.Float(x2, y2),
                            at.inverseTransform(new Point2D.Float(x1, y1), null));

                    Point2D dst = new Point2D.Double();
                    assertEquals(
                            new Point2D.Double(x2, y2),
                            at.inverseTransform(new Point2D.Double(x1, y1), dst));
View Full Code Here

                            at.inverseTransform(new Point2D.Float(x1, y1), null));

                    Point2D dst = new Point2D.Double();
                    assertEquals(
                            new Point2D.Double(x2, y2),
                            at.inverseTransform(new Point2D.Double(x1, y1), dst));
                    assertEquals(
                            new Point2D.Double(x2, y2),
                            dst);
                } catch(NoninvertibleTransformException e) {
                    fail(e.toString());
View Full Code Here

        AffineTransform at = new AffineTransform(0, 1, -2, 0, 3, 4);
        double[] src = new double[]{0, 0, 0, 0, 0, 0, 1, 1, 0, 0};
        double[] dst = new double[6];
        double[] expected = new double[]{0, 0, -4, 1.5, -3, 1};
        try {
            at.inverseTransform(src, 4, dst, 2, 2);
            assertEquals(expected, dst, 6, 0.0);
        } catch(NoninvertibleTransformException e) {
            fail(e.toString());
        }
    }
View Full Code Here

                AffineTransform at = overlay.getOverlayTransform();
                Point2D pt0 = new Point2D.Float(0, 0);
                Point2D pt = new Point2D.Float(dx, dy);

                try {
                    at.inverseTransform(pt0, pt0);
                    at.inverseTransform(pt, pt);
                    double tx = pt0.getX() - pt.getX();
                    double ty = pt0.getY() - pt.getY();
                    at = svgCanvas.getRenderingTransform();
                    at.preConcatenate
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.