From 4f20c26bdef2ffef19a37f8a2dec11bc2201e317 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Mon, 14 May 2018 13:07:02 +0300 Subject: [PATCH] Support for edge widths in rendering Change-Id: I079ad59d7997a4a17abaf7835f7d71ce8c006085 --- .../src/org/simantics/graphviz/internal/xdot/SetStyle.java | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.47.1