]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/spatial/RTreeNode.java
Introduced G2DRenderingHints.KEY_TRANSFORM_UNDER_SPATIAL_ROOT
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / nodes / spatial / RTreeNode.java
index 56b6be302e44910e22fb62f47310406ba2c419e8..04bad53c01ae93167509add0004949a2ae1e44c5 100644 (file)
@@ -26,6 +26,7 @@ import java.util.Set;
 
 import org.simantics.scenegraph.INode;
 import org.simantics.scenegraph.g2d.G2DParentNode;
+import org.simantics.scenegraph.g2d.G2DRenderingHints;
 import org.simantics.scenegraph.g2d.IG2DNode;
 import org.simantics.scenegraph.g2d.events.Event;
 import org.simantics.scenegraph.g2d.events.EventTypes;
@@ -134,6 +135,8 @@ public class RTreeNode extends G2DParentNode implements INodeEventHandlerProvide
             g.transform(transform);
         }
 
+        g.setRenderingHint(G2DRenderingHints.KEY_TRANSFORM_UNDER_SPATIAL_ROOT, g.getTransform());
+
         try {
             // Get transformed clip bounds
             Shape clipShape = g.getClip();
@@ -242,6 +245,7 @@ public class RTreeNode extends G2DParentNode implements INodeEventHandlerProvide
 //        drawTree(g, tree.rtree);
 
         } finally {
+            g.setRenderingHint(G2DRenderingHints.KEY_TRANSFORM_UNDER_SPATIAL_ROOT, null);
             if (ot != null)
                 g.setTransform(ot);
         }