Package com.tinyline.svg

Examples of com.tinyline.svg.SVGSVGElem


    // Get the current viewport
    SVGRect view = raster.view;
    // Get the SVGT document
    SVGDocument doc = raster.getSVGDocument();
    // Get the root of the SVGT document
    SVGSVGElem root = (SVGSVGElem)doc.root;
    // Get the current scale value
    int scale = root.getCurrentScale();
    // Scale pan distances according to the current scale factor
    // Change the current viewport
    view.x += TinyUtil.div(x<<TinyUtil.FIX_BITS,scale);
    view.y += TinyUtil.div(y<<TinyUtil.FIX_BITS,scale);
   
View Full Code Here


        // If the current document is not zoom and pan anabled then
        // just quit
        if(!document.isZoomAndPanAnable()) return;
        // 1. Get the drag point
        point = (TinyPoint)theEvent.data;
        SVGSVGElem root = (SVGSVGElem)document.root;
        // 2. Get the current scale
        int scale = root.getCurrentScale();
        // 3. Calculate the new current view
        view = canvas.raster.view;
        view.x += TinyUtil.div(point.x<<TinyUtil.FIX_BITS,scale);
        view.y += TinyUtil.div(point.y<<TinyUtil.FIX_BITS,scale);
        // 5. Set the camera transform
View Full Code Here

TOP

Related Classes of com.tinyline.svg.SVGSVGElem

Copyright © 2018 www.massapicom. 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.