import java.awt.BasicStroke;\r
import java.awt.Color;\r
import java.awt.Shape;\r
+import java.awt.geom.AffineTransform;\r
import java.awt.geom.Path2D;\r
import java.awt.geom.Rectangle2D;\r
import java.util.Collection;\r
\r
@Override\r
public void init(IElement e, G2DParentNode parent) {\r
+ AffineTransform at = ElementUtils.getTransform(e);\r
HoverShapeNode node = ElementUtils.getOrCreateNode(e, parent, NODE, "valve", HoverShapeNode.class);\r
\r
node.setStroke(STROKE);\r
node.setColor(Color.BLACK);\r
node.setShape(getCloudShape());\r
\r
+ if(at != null)\r
+ node.setTransform(at);\r
+ \r
hoverHintListener = new IHintListener() {\r
\r
@Override\r
\r
import java.awt.Color;\r
import java.awt.Font;\r
+import java.awt.geom.AffineTransform;\r
\r
import org.simantics.diagram.elements.ITextListener;\r
import org.simantics.diagram.elements.TextElementNoBounds;\r
Color fillColor = ElementUtils.getFillColor(e);\r
Color borderColor = ElementUtils.getBorderColor(e, Color.BLACK);\r
String text = ElementUtils.getText(e);\r
+ AffineTransform at = ElementUtils.getTransform(e);\r
node.init(text, font, color, originX, originY, 0.235);\r
node.setBackgroundColor(fillColor);\r
node.setBorderColor(borderColor);\r
node.setPadding(paddingX, paddingY);\r
node.setBorderWidth((float) borderWidth);\r
node.setEditable(editable);\r
+ if(at != null)\r
+ node.setTransform(at);\r
\r
this.hoverHintListener = new IHintListener() {\r
@Override\r
\r
import java.awt.BasicStroke;\r
import java.awt.Color;\r
+import java.awt.geom.AffineTransform;\r
import java.awt.geom.Path2D;\r
import java.awt.geom.Rectangle2D;\r
import java.util.Collection;\r
@Override\r
public void init(IElement e, G2DParentNode parent) {\r
super.init(e, parent);\r
+ AffineTransform at = ElementUtils.getTransform(e);\r
final HoverShapeNode node = ElementUtils.getOrCreateNode(e, parent, NODE, "valve", HoverShapeNode.class);\r
\r
// Calculate borders from text node bounds.\r
node.setShape(createShape(VALVE_SIZE, Boolean.TRUE.equals(e.getHint(KEY_ROTATED))));\r
node.setHover(ElementUtils.isHovering(e));\r
\r
+ if(at != null)\r
+ node.setTransform(at);\r
+ \r
hoverHintListener = new IHintListener() {\r
\r
@Override\r