I realized something new.
Due to your question, I started to draw many icons, more than 378, and the
white regions didn't  appear, but after this, I drag one , white areas
everywhere!!!!.

this is the way I drag an icon: 

public void moveElement(SVGGraphicElement e, Point2D.Double point)
    {
        if (e != null) 
        {
            Element elt = this.getBasedocument().getElementById(e.getId());
            if (elt != null) 
            {
                Element elementg = (Element)
elt.getElementsByTagName("g").item(0);
                Point2D.Double newpoint = this.scaledPoint(new
Point2D.Double(point.getX(), point.getY()));
                elementg.setAttribute("transform", "translate(" + newpoint.x
+ "," + newpoint.y + ")");
                e.setPosition(newpoint);
            }
        }
    }


public Point2D.Double scaledPoint(Point2D.Double originalPoint) {
        AffineTransform viewBoxTranfrom =
this.getSvgCanvas().getViewBoxTransform();
        Point2D.Double destinypoint = new Point2D.Double();
        try {
            viewBoxTranfrom = viewBoxTranfrom.createInverse();
        } catch (NoninvertibleTransformException e) {
            e.printStackTrace();
        }
        double[] matrix = new double[6];
        viewBoxTranfrom.getMatrix(matrix);
        destinypoint.x = (float) (matrix[0] * originalPoint.x + matrix[2] *
originalPoint.y + matrix[4]);
        destinypoint.y = (float) (matrix[1] * originalPoint.x + matrix[3] *
originalPoint.y + matrix[5]);
        return destinypoint;
    }
Do you see something wrong, inefficient or unecessary?.



-- 
View this message in context: 
http://www.nabble.com/Some-white-areas-appear--after-many-zoom-in%2C-zoom-out-and-pan-actions-tp19460378p19610755.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to