X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fg2d%2FIG2DNode.java;h=2d17e47c594fbc2ad546106a2a0d6c9777bd7d95;hb=512d469c3e490cdfc9a10fbbd6efe92ae6c0358a;hp=0afebc2db387857a305a8458001755c28766e973;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IG2DNode.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IG2DNode.java index 0afebc2db..2d17e47c5 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IG2DNode.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IG2DNode.java @@ -50,8 +50,9 @@ public interface IG2DNode extends INode, IEventHandler { public boolean validate(); /** - * Perform the actual rendering. Node state changes should be avoided in - * this method. This method should not change the transform of the g2d + * Perform the actual rendering. Node state changes must be avoided in + * this method. Implement node state changes to refresh method instead. + * This method should not change the transform of the g2d * instance. You should call g2d.create or copy the original transform and * put it back at the end of this method according to what is specified in * {@link Graphics2D#setTransform(AffineTransform)}. @@ -70,6 +71,19 @@ public interface IG2DNode extends INode, IEventHandler { * @see #getTransform() */ public void render(Graphics2D g2d); + + /** + * Refresh the node state. + */ + public void refresh(); + + /** + * Visit the IG2DNode substructure of this node using the provided visitor. + * + * @param visitor the visitor to use + * @since 1.29.0 + */ + public void accept(IG2DNodeVisitor visitor); /** * Mark the scene graph to be repainted in its current rendering context (UI