From abf2ed8ae8450801e20ce3b3ea5708b15c8db06f Mon Sep 17 00:00:00 2001 From: villberg Date: Thu, 20 Oct 2011 11:41:07 +0000 Subject: [PATCH] Hopefully fixed TextNode in sysdyn. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@22891 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../org/simantics/sysdyn/ui/elements2/HoverTextNode.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextNode.java index 7b4f2463..ef8bab71 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextNode.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextNode.java @@ -45,13 +45,15 @@ public class HoverTextNode extends TextNode implements ISelectionPainterNode { BasicStroke oldStroke = (BasicStroke)g.getStroke(); Color oldColor = g.getColor(); g.setColor(Color.LIGHT_GRAY); - g.setStroke(new BasicStroke((float)(2.0f * scale))); + g.setStroke(new BasicStroke((float)(2.0f))); g.translate(x, y); - Rectangle2D r = expandBounds( alignBounds( getTightUnalignedBoundsInLocal( tempBounds.get() ) ) ); - g.draw(r); + g.scale(scale, scale); + g.draw(expandBoundsUnscaled(getTextBounds())); g.translate(-x, -y); g.setColor(oldColor); g.setStroke(oldStroke); + g.scale(scaleRecip, scaleRecip); + } super.render(g, false); -- 2.47.1