Examples of SVGLocatableElement


Examples of org.w3c.dom.svg.SVGLocatableElement

        _cursorY =
                MathUtilities.clamp(0, _cursorY + translateY, _displayHeight);
        _cursorPosition.setTrait("#text", "" + _cursorX + ',' + _cursorY);

        // If a shape is selected then update the display.
        final SVGLocatableElement selected = findFirstSelectedShape();

        if (selected != null) {
            // Get the bounding box of selected object
            final SVGRect rect = selected.getBBox();

            // Update the display for the selected shape.
            updateDisplay(true, selected.getTrait("id"), rect);

            // Updated the bounding box for the selected shape.
            updateBounds(true, rect);
        } else {
            updateDisplay(false, null, null);
View Full Code Here

Examples of org.w3c.dom.svg.SVGLocatableElement

        // Scroll through shapes, determine if cursor point
        // is within shape's bounding box, and update.
        SVGRect box;

        for (int i = 0; i < _selectableShapes.size(); i++) {
            final SVGLocatableElement element =
                    (SVGLocatableElement) _selectableShapes.elementAt(i);
            box = element.getBBox();

            // Do a bounding box to point test.
            if (_cursorX >= box.getX()
                    && _cursorX <= box.getX() + box.getWidth()
                    && _cursorY >= box.getY()
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.