diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-02-18 00:41:37 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-02-18 00:41:37 -0500 |
| commit | 96f6bc8a3099754bf79a05af7a1ec342f8030335 (patch) | |
| tree | 9ff52b5339140d453fb0163a0eb7bba3501d0a27 /python/examples | |
| parent | c46c3a9540f4d15eff8aa9660df69e374f7fd2f5 (diff) | |
Add back edge property to block edges
Diffstat (limited to 'python/examples')
| -rwxr-xr-x | python/examples/export_svg.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/examples/export_svg.py b/python/examples/export_svg.py index 89bc41a1..95e2d62d 100755 --- a/python/examples/export_svg.py +++ b/python/examples/export_svg.py @@ -80,6 +80,10 @@ def render_svg(function): fill: none; stroke-width: 1px; } + .back_edge { + fill: none; + stroke-width: 2px; + } .UnconditionalBranch, .IndirectBranch { stroke: rgb(128, 198, 233); color: rgb(128, 198, 233); @@ -197,7 +201,10 @@ def render_svg(function): points += str(x * widthconst) + "," + str(y * heightconst) + " " x, y = edge.points[-1] points += str(x * widthconst) + "," + str(y * heightconst + 0) + " " - edges += ' <polyline class="edge {type}" points="{points}" marker-end="url(#arrow-{type})"/>\n'.format(type=BranchType(edge.type).name, points=points) + if edge.back_edge: + edges += ' <polyline class="back_edge {type}" points="{points}" marker-end="url(#arrow-{type})"/>\n'.format(type=BranchType(edge.type).name, points=points) + else: + edges += ' <polyline class="edge {type}" points="{points}" marker-end="url(#arrow-{type})"/>\n'.format(type=BranchType(edge.type).name, points=points) output += ' ' + edges + '\n' output += ' </g>\n' output += '</svg></html>' |
