Package java.awt.geom

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


                Point2D tp1 = new Point2D.Double();
                Point2D tp2 = new Point2D.Double();
                Point2D tp3 = new Point2D.Double();
                tr.transform(p1, tp1);
                tr.transform(p2, tp2);
                tr.transform(p3, tp3);
                double tdx12 = tp1.getX()-tp2.getX();
                double tdx13 = tp1.getX()-tp3.getX();
                double tdy12 = tp1.getY()-tp2.getY();
                double tdy13 = tp1.getY()-tp3.getY();
View Full Code Here


                 try {
                     t = (AffineTransform) t.createInverse();
                 } catch (NoninvertibleTransformException ni) {
                 }
            }
            p = t.transform(p, null);

            if (isDeselectGesture(evt)) {
                if (selectionNode != null)
                    selectionNode.getRoot()
                        .removeTreeGraphicsNodeChangeListener(this);
View Full Code Here

                        try {
                            AffineTransform at = svgCanvas.getRenderingTransform();
                            if (at != null) {
                                at = at.createInverse();
                                Point2D p2d =
                                    at.transform(new Point2D.Float(e.getX(), e.getY()),
                                                 null);
                                statusBar.setXPosition((float)p2d.getX());
                                statusBar.setYPosition((float)p2d.getY());
                                return;
                            }
View Full Code Here

                        try {
                            AffineTransform at = svgCanvas.getRenderingTransform();
                            if (at != null) {
                                at = at.createInverse();
                                Point2D o =
                                    at.transform(new Point2D.Float(0, 0),
                                                 null);
                                Point2D p2d =
                                    at.transform(new Point2D.Float(dim.width,
                                                                   dim.height),
                                                 null);
View Full Code Here

                                at = at.createInverse();
                                Point2D o =
                                    at.transform(new Point2D.Float(0, 0),
                                                 null);
                                Point2D p2d =
                                    at.transform(new Point2D.Float(dim.width,
                                                                   dim.height),
                                                 null);
                                statusBar.setWidth((float)(p2d.getX() - o.getX()));
                                statusBar.setHeight((float)(p2d.getY() - o.getY()));
                                return;
View Full Code Here

                        try {
                            AffineTransform at = svgCanvas.getRenderingTransform();
                            if (at != null) {
                                at = at.createInverse();
                                Point2D o =
                                    at.transform(new Point2D.Float(0, 0),
                                                 null);
                                Point2D p2d =
                                    at.transform(new Point2D.Float(dim.width,
                                                                   dim.height),
                                                 null);
View Full Code Here

                                at = at.createInverse();
                                Point2D o =
                                    at.transform(new Point2D.Float(0, 0),
                                                 null);
                                Point2D p2d =
                                    at.transform(new Point2D.Float(dim.width,
                                                                   dim.height),
                                                 null);
                                statusBar.setWidth((float)(p2d.getX() - o.getX()));
                                statusBar.setHeight((float)(p2d.getY() - o.getY()));
                                return;
View Full Code Here

         */
        protected Point getClientMouseLocation(Point2D coords) {
            AffineTransform transform = ua.getTransform();
            Point2D p = coords;
            if (transform != null && !transform.isIdentity()) {
                p = transform.transform(coords, null);
            }
            return new Point((int)Math.floor(coords.getX()),
                             (int)Math.floor(coords.getY()));
        }

View Full Code Here

        if (log.isTraceEnabled()) {
            log.trace("Current transform: " + at);
        }
        Point2D.Float orgPoint = new Point2D.Float(x, y);
        Point2D.Float transPoint = new Point2D.Float();
        at.transform(orgPoint, transPoint);
        //At this point we have the absolute position in FOP's coordinate system
       
        //Now get PCL coordinates taking the current print direction and the logical page
        //into account.
        Dimension pageSize = currentPageDefinition.getPhysicalPageSize();
View Full Code Here

                        try {
                            AffineTransform at = svgCanvas.getRenderingTransform();
                            if (at != null) {
                                at = at.createInverse();
                                Point2D p2d =
                                    at.transform(new Point2D.Float(e.getX(), e.getY()),
                                                 null);
                                statusBar.setXPosition((float)p2d.getX());
                                statusBar.setYPosition((float)p2d.getY());
                                return;
                            }
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.