I have an application with batik in an SVG canvas inside a scroll pane, I have it set up so that it's possible to zoom in and out.
I also overlay on top several JComponents that zoom in sequence with the Batik image.
When you zoom in on a Batik image, if there is enough space in the canvas window, instead of using the scale factor quote in an AffineTransform the batik image will sometimes enlarge its self if there is space, is there anyway of stopping it doing this? Or alternatively find out what its actual done?
This is generally controlled by the 'updateRenderingTransform()' method on the JSVGCanvas. If you want to know what the current rendering transform is (i.e. how the SVG document is being mapped to the window) you can always call getRenderingTransform().
If you have a Batik image in a JSvgCanvas and the Batik image is smaller than the window, then the image in cantered in the middle of the window, is there any way of forcing that batik image to either lock to the left hand border. It is possible to take the window size, and the batik image size, subtract the two and use that as a image offset, but I would prefer that the batik image, just align itself to the left margin.
This is done the by the updateRenderingTransform method.
I have assumed that batik is being clever and performing a scale to fit
Yes, but partly because the SVG specification requires this for content that has a 'viewBox' attribute. You may be able to get what you want just by playing with the 'preserveAspectRatio' attribute on the outermost SVG element.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]