-
- AffineTransform oldTransform = g.getTransform();
-
- // There has to be a better way to calculate the zoom level in this context...
- AffineTransform baseTransform;
- try {
- baseTransform = ((G2DParentNode)getParent()).getTransform().createInverse();
- } catch (NoninvertibleTransformException e) {
- baseTransform = new AffineTransform();
- }
-
- baseTransform.preConcatenate(oldTransform);
- int zoomLevel = MapScalingTransform.zoomLevel(baseTransform);