From: Hannu Niemistö Date: Mon, 14 May 2018 10:07:02 +0000 (+0300) Subject: Support for edge widths in rendering X-Git-Tag: v1.43.0~136^2~482^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=4f20c26bdef2ffef19a37f8a2dec11bc2201e317;p=simantics%2Fplatform.git Support for edge widths in rendering Change-Id: I079ad59d7997a4a17abaf7835f7d71ce8c006085 --- diff --git a/bundles/org.simantics.graphviz/src/org/simantics/graphviz/internal/xdot/SetStyle.java b/bundles/org.simantics.graphviz/src/org/simantics/graphviz/internal/xdot/SetStyle.java index 5269ac09d..1098c53fd 100644 --- a/bundles/org.simantics.graphviz/src/org/simantics/graphviz/internal/xdot/SetStyle.java +++ b/bundles/org.simantics.graphviz/src/org/simantics/graphviz/internal/xdot/SetStyle.java @@ -34,6 +34,10 @@ public class SetStyle implements DrawCommand { g.setStroke(DASHED); else if(styleName.equals("dotted")) g.setStroke(DOTTED); + else if(styleName.startsWith("setlinewidth(")) { + double w = Double.parseDouble(styleName.substring(13, styleName.length()-1)); + g.setStroke(new BasicStroke((float)w, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f, ((BasicStroke)g.getStroke()).getDashArray(), 0.0f)); + } else System.out.println("Unknown style: " + styleName); }