I was working with the about the scroll pane issues some more, and the
more I think about the more I think all I need to do is to get batik to
ignore the component size when drawing the form.

So, here is what I did to the updateRenderingTransform() method.  What
do you think?  The flag a refer to might be nice to have as a
getter/setter property.

-----------------
protected boolean updateRenderingTransform() {
        if ((svgDocument == null) || (gvtRoot == null))
                return false;
        
        try {
                SVGSVGElement elt = svgDocument.getRootElement();
                Dimension d;
                if (false)  //Some settable flag
                        d = getSize();
                else {
                        Dimension2D d2 = getSVGDocumentSize();
                        d = new
Dimension((int)d2.getWidth(),(int)d2.getHeight());
                }
                Dimension oldD = prevComponentSize;
                if (oldD == null) oldD = d;
                prevComponentSize = d;
                
                if (d.width  < 1) d.width  = 1;
                if (d.height < 1) d.height = 1;
                AffineTransform at = ViewBox.getViewTransform
                (fragmentIdentifier, elt, d.width, d.height);
                CanvasGraphicsNode cgn = getCanvasGraphicsNode();
                AffineTransform vt = cgn.getViewingTransform();
                if (at.equals(vt)) {
                        // No new transform
                        // Only repaint if size really changed.
                        return ((oldD.width != d.width) || (oldD.height
!= d.height));
                }



---------------------
"Nonviolence is the answer to the crucial political and moral questions
of our time; the need for man to overcome oppression and violence
without resorting to oppression and violence. "
-- Martin Luther King Jr.

Mark Claassen
Donnell Systems, Inc.
300 S. St. Louis Blvd. Ste. 203 
South Bend, IN 46617
E-mail: mailto:[EMAIL PROTECTED]
Voice: (574)232-3784
Fax: (574)232-4014


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

Reply via email to