Package diva.canvas.interactor

Examples of diva.canvas.interactor.GrabHandle.translate()


            // Snap to grid.
            double[] snapped = _snapConstraint.constrain(x, y);

            // Translate the grab-handle, resizing the geometry
            GrabHandle g = (GrabHandle) e.getFigureSource();
            g.translate(snapped[0], snapped[1]);

            // Transform the child.
            BoundsManipulator parent = (BoundsManipulator) g.getParent();
            BoundsGeometry geometry = parent.getGeometry();
View Full Code Here


                // Resize Handle //
                ///////////////////
                RectangularShape r1 = (RectangularShape) geometry.getRect().clone();

                // translating the grab handle
                grabHandle.translate(dx, dy);

                // transform the child roi
                RectangularShape r2 = geometry.getRect();
                double angle = geometry.getRotateAngle();
                af.concatenate(AffineTransform.getRotateInstance(angle, cx, cy));
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.