I have found a way that seems to work. Any comments?...
canvas = new JSVGCanvas() {
protected AffineTransform calculateViewingTransform(String
fragIdent, SVGSVGElement svgElt) {
AffineTransform rval;
if (svgElt == canvas.getSVGDocument().getRootElement()) {
Dimension2D d2 = canvas.getSVGDocumentSize();
Dimension d = new
Dimension((int)d2.getWidth(),(int)d2.getHeight());
if (d.width < 1) d.width = 1;
if (d.height < 1) d.height = 1;
rval = ViewBox.getViewTransform(fragIdent, svgElt,
d.width, d.height);
}
else
rval = super.calculateViewingTransform(fragIdent,
svgElt);
return rval;
}
};
-----Original Message-----
From: Mark Claassen [mailto:[EMAIL PROTECTED]
Sent: Friday, December 01, 2006 2:04 PM
To: [email protected]
Subject: Batik 1.6 and JSVGScrollPane
Back in the day I modified some things in Batik 1.5 to get scrolling to work
the way I wanted it to. I am looking into this again, and I see that the
JSVGScrollPane has been added. Great!
I am porting my code to use this new feature and am having a bit of trouble.
Right now, my main stumbling block is that the document always comes up
fitting the window that it is in. This is not the behavior I want. I want
it to come up at the size specified in the svg document.
I think most of the other zoom controls I have (fit width / fit to page)
will work once I have a consistent initial size.
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]