]> 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 52403edd02ea251522270f43ec9904614cda8c0b..1d3ee97409fe6aae0efbc41231cf6ad0a859ab9e 100644 (file)
@@ -24,6 +24,7 @@ import java.util.Properties;
 import java.util.Set;
 
 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;
@@ -127,6 +128,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();
@@ -235,6 +238,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);
         }