Hi, I've got an issue with the bounding boxes. Correct me if I'm wrong, but it seems that the Batik bounds returned by getBounds() and getTransformedBounds() are calculated with regard to efficiency, and are therefore not always correct.
When I display a bounding box for a rotated circle (which should have the same bounds no matter how it is rotated) the box changes as if the original square bounding box was part of the shape, e.g. the bounds get larger as you approach 45 degrees. That would mean that the bbox is in fact a maximum bbox. The exact bounds can't be larger (so it's safe to clip), but they could be smaller. Is there another method that would yield the accurate bounds of transformed shapes? My idea would be as follows: As the bounds of an untransformed path are 100% accurate, I'd like to write a recursive function that calculates a bounding box by gathering all the inner shapes of a node, transforming their GeneralPaths, and then adding all the Rectangles together. That's inefficient, but probably accurate. Does something like this exist already? Or am I maybe missing something important here? Many thanks and best regards, Gerrit -- http://www.fastmail.fm - Access your email from home and the web --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
