Added some Graphviz Magic for drawing Dots at the end of straight lines

This commit is contained in:
Tobias Falk 2024-06-18 23:00:52 +02:00
parent 39251f512c
commit e0ae9be20b
12 changed files with 243 additions and 60 deletions

32
examples/ex15.gv generated
View File

@ -5,10 +5,10 @@ graph {
node [fillcolor="#FFFFFF" fontname=arial height=0 margin=0 shape=none style=filled width=0]
edge [fontname=arial style=bold]
edge [color="#FF66CC" headclip=false style="solid,bold" tailclip=false]
X1:p1j:c -- X1:p5j:c [straight=straight]
X1:p5j:c -- X1:p7j:c [straight=straight]
X1:p1j:c -- X1:p5j:c [addPTS=.18 colorPTS="#FF66CC" straight=straight]
X1:p5j:c -- X1:p7j:c [addPTS=.18 colorPTS="#FF66CC" straight=straight]
edge [color="#FF0000" headclip=false style="solid,bold" tailclip=false]
X1:p2j:c -- X1:p6j:c [straight=straight]
X1:p2j:c -- X1:p6j:c [addPTS=.18 colorPTS="#FF0000" straight=straight]
edge [headclip=true style=bold tailclip=true]
X1 [label=<
<table border="0" cellspacing="0" cellpadding="0">
@ -34,14 +34,14 @@ graph {
</tr>
<tr>
<td>GND</td>
<td port="p1J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#FF66CC">&#11044;</FONT></td>
<td width="21" port="p1J"></td>
<td></td>
<td port="p1r">1</td>
</tr>
<tr>
<td>VCC</td>
<td></td>
<td port="p2J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#FF0000">&#11044;</FONT></td>
<td width="21" port="p2J"></td>
<td port="p2r">2</td>
</tr>
<tr>
@ -58,19 +58,19 @@ graph {
</tr>
<tr>
<td>GND</td>
<td port="p5J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#FF66CC">&#11044;</FONT></td>
<td width="21" port="p5J"></td>
<td></td>
<td port="p5r">5</td>
</tr>
<tr>
<td>VCC</td>
<td></td>
<td port="p6J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#FF0000">&#11044;</FONT></td>
<td width="21" port="p6J"></td>
<td port="p6r">6</td>
</tr>
<tr>
<td>GND</td>
<td port="p7J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#FF66CC">&#11044;</FONT></td>
<td width="21" port="p7J"></td>
<td></td>
<td port="p7r">7</td>
</tr>
@ -94,10 +94,10 @@ graph {
</table>
> fillcolor="#FFFFFF" shape=box style=filled]
edge [color="#000000" headclip=false style="solid,bold" tailclip=false]
X2:p1j:c -- X2:p5j:c [straight=straight]
X2:p5j:c -- X2:p7j:c [straight=straight]
X2:p1j:c -- X2:p5j:c [addPTS=.18 colorPTS="#000000" straight=straight]
X2:p5j:c -- X2:p7j:c [addPTS=.18 colorPTS="#000000" straight=straight]
edge [color="#000000" headclip=false style="solid,bold" tailclip=false]
X2:p2j:c -- X2:p6j:c [straight=straight]
X2:p2j:c -- X2:p6j:c [addPTS=.18 colorPTS="#000000" straight=straight]
edge [headclip=true style=bold tailclip=true]
X2 [label=<
<table border="0" cellspacing="0" cellpadding="0">
@ -124,14 +124,14 @@ graph {
<tr>
<td port="p1l">1</td>
<td>GND</td>
<td port="p1J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#000000">&#11044;</FONT></td>
<td width="21" port="p1J"></td>
<td></td>
</tr>
<tr>
<td port="p2l">2</td>
<td>VCC</td>
<td></td>
<td port="p2J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#000000">&#11044;</FONT></td>
<td width="21" port="p2J"></td>
</tr>
<tr>
<td port="p3l">3</td>
@ -148,19 +148,19 @@ graph {
<tr>
<td port="p5l">5</td>
<td>GND</td>
<td port="p5J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#000000">&#11044;</FONT></td>
<td width="21" port="p5J"></td>
<td></td>
</tr>
<tr>
<td port="p6l">6</td>
<td>VCC</td>
<td></td>
<td port="p6J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#000000">&#11044;</FONT></td>
<td width="21" port="p6J"></td>
</tr>
<tr>
<td port="p7l">7</td>
<td>GND</td>
<td port="p7J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="#000000">&#11044;</FONT></td>
<td width="21" port="p7J"></td>
<td></td>
</tr>
</table>

70
examples/ex15.html generated
View File

@ -58,7 +58,6 @@
<polygon fill="none" stroke="black" points="0,-217.5 0,-241.5 58.88,-241.5 58.88,-217.5 0,-217.5"/>
<text text-anchor="start" x="13.69" y="-224.2" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="58.88,-217.5 58.88,-241.5 113.75,-241.5 113.75,-217.5 58.88,-217.5"/>
<text text-anchor="start" x="79.56" y="-225.23" font-family="Sans" font-size="12.00" fill="#ff66cc"></text>
<polygon fill="none" stroke="black" points="113.75,-217.5 113.75,-241.5 168.63,-241.5 168.63,-217.5 113.75,-217.5"/>
<polygon fill="none" stroke="black" points="168.63,-217.5 168.63,-241.5 204.5,-241.5 204.5,-217.5 168.63,-217.5"/>
<text text-anchor="start" x="182.44" y="-224.2" font-family="arial" font-size="14.00">1</text>
@ -66,7 +65,6 @@
<text text-anchor="start" x="14.06" y="-200.2" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="58.88,-193.5 58.88,-217.5 113.75,-217.5 113.75,-193.5 58.88,-193.5"/>
<polygon fill="none" stroke="black" points="113.75,-193.5 113.75,-217.5 168.63,-217.5 168.63,-193.5 113.75,-193.5"/>
<text text-anchor="start" x="134.44" y="-201.23" font-family="Sans" font-size="12.00" fill="#ff0000"></text>
<polygon fill="none" stroke="black" points="168.63,-193.5 168.63,-217.5 204.5,-217.5 204.5,-193.5 168.63,-193.5"/>
<text text-anchor="start" x="182.44" y="-200.2" font-family="arial" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="0,-169.5 0,-193.5 58.88,-193.5 58.88,-169.5 0,-169.5"/>
@ -84,7 +82,6 @@
<polygon fill="none" stroke="black" points="0,-121.5 0,-145.5 58.88,-145.5 58.88,-121.5 0,-121.5"/>
<text text-anchor="start" x="13.69" y="-128.2" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="58.88,-121.5 58.88,-145.5 113.75,-145.5 113.75,-121.5 58.88,-121.5"/>
<text text-anchor="start" x="79.56" y="-129.23" font-family="Sans" font-size="12.00" fill="#ff66cc"></text>
<polygon fill="none" stroke="black" points="113.75,-121.5 113.75,-145.5 168.63,-145.5 168.63,-121.5 113.75,-121.5"/>
<polygon fill="none" stroke="black" points="168.63,-121.5 168.63,-145.5 204.5,-145.5 204.5,-121.5 168.63,-121.5"/>
<text text-anchor="start" x="182.44" y="-128.2" font-family="arial" font-size="14.00">5</text>
@ -92,13 +89,11 @@
<text text-anchor="start" x="14.06" y="-104.2" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="58.88,-97.5 58.88,-121.5 113.75,-121.5 113.75,-97.5 58.88,-97.5"/>
<polygon fill="none" stroke="black" points="113.75,-97.5 113.75,-121.5 168.63,-121.5 168.63,-97.5 113.75,-97.5"/>
<text text-anchor="start" x="134.44" y="-105.23" font-family="Sans" font-size="12.00" fill="#ff0000"></text>
<polygon fill="none" stroke="black" points="168.63,-97.5 168.63,-121.5 204.5,-121.5 204.5,-97.5 168.63,-97.5"/>
<text text-anchor="start" x="182.44" y="-104.2" font-family="arial" font-size="14.00">6</text>
<polygon fill="none" stroke="black" points="0,-73.5 0,-97.5 58.88,-97.5 58.88,-73.5 0,-73.5"/>
<text text-anchor="start" x="13.69" y="-80.2" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="58.88,-73.5 58.88,-97.5 113.75,-97.5 113.75,-73.5 58.88,-73.5"/>
<text text-anchor="start" x="79.56" y="-81.23" font-family="Sans" font-size="12.00" fill="#ff66cc"></text>
<polygon fill="none" stroke="black" points="113.75,-73.5 113.75,-97.5 168.63,-97.5 168.63,-73.5 113.75,-73.5"/>
<polygon fill="none" stroke="black" points="168.63,-73.5 168.63,-97.5 204.5,-97.5 204.5,-73.5 168.63,-73.5"/>
<text text-anchor="start" x="182.44" y="-80.2" font-family="arial" font-size="14.00">7</text>
@ -247,7 +242,6 @@
<polygon fill="none" stroke="black" points="802.07,-219.75 802.07,-243.75 856.88,-243.75 856.88,-219.75 802.07,-219.75"/>
<text text-anchor="start" x="813.72" y="-226.45" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="856.88,-219.75 856.88,-243.75 907.69,-243.75 907.69,-219.75 856.88,-219.75"/>
<text text-anchor="start" x="875.54" y="-227.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="907.69,-219.75 907.69,-243.75 958.51,-243.75 958.51,-219.75 907.69,-219.75"/>
<polygon fill="none" stroke="black" points="770.26,-195.75 770.26,-219.75 802.07,-219.75 802.07,-195.75 770.26,-195.75"/>
<text text-anchor="start" x="782.04" y="-202.45" font-family="arial" font-size="14.00">2</text>
@ -255,7 +249,6 @@
<text text-anchor="start" x="814.1" y="-202.45" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="856.88,-195.75 856.88,-219.75 907.69,-219.75 907.69,-195.75 856.88,-195.75"/>
<polygon fill="none" stroke="black" points="907.69,-195.75 907.69,-219.75 958.51,-219.75 958.51,-195.75 907.69,-195.75"/>
<text text-anchor="start" x="926.35" y="-203.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="770.26,-171.75 770.26,-195.75 802.07,-195.75 802.07,-171.75 770.26,-171.75"/>
<text text-anchor="start" x="782.04" y="-178.45" font-family="arial" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="802.07,-171.75 802.07,-195.75 856.88,-195.75 856.88,-171.75 802.07,-171.75"/>
@ -273,7 +266,6 @@
<polygon fill="none" stroke="black" points="802.07,-123.75 802.07,-147.75 856.88,-147.75 856.88,-123.75 802.07,-123.75"/>
<text text-anchor="start" x="813.72" y="-130.45" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="856.88,-123.75 856.88,-147.75 907.69,-147.75 907.69,-123.75 856.88,-123.75"/>
<text text-anchor="start" x="875.54" y="-131.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="907.69,-123.75 907.69,-147.75 958.51,-147.75 958.51,-123.75 907.69,-123.75"/>
<polygon fill="none" stroke="black" points="770.26,-99.75 770.26,-123.75 802.07,-123.75 802.07,-99.75 770.26,-99.75"/>
<text text-anchor="start" x="782.04" y="-106.45" font-family="arial" font-size="14.00">6</text>
@ -281,13 +273,11 @@
<text text-anchor="start" x="814.1" y="-106.45" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="856.88,-99.75 856.88,-123.75 907.69,-123.75 907.69,-99.75 856.88,-99.75"/>
<polygon fill="none" stroke="black" points="907.69,-99.75 907.69,-123.75 958.51,-123.75 958.51,-99.75 907.69,-99.75"/>
<text text-anchor="start" x="926.35" y="-107.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="770.26,-75.75 770.26,-99.75 802.07,-99.75 802.07,-75.75 770.26,-75.75"/>
<text text-anchor="start" x="782.04" y="-82.45" font-family="arial" font-size="14.00">7</text>
<polygon fill="none" stroke="black" points="802.07,-75.75 802.07,-99.75 856.88,-99.75 856.88,-75.75 802.07,-75.75"/>
<text text-anchor="start" x="813.72" y="-82.45" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="856.88,-75.75 856.88,-99.75 907.69,-99.75 907.69,-75.75 856.88,-75.75"/>
<text text-anchor="start" x="875.54" y="-83.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="907.69,-75.75 907.69,-99.75 958.51,-99.75 958.51,-75.75 907.69,-75.75"/>
</g>
<!-- W1&#45;&#45;X2 -->
@ -333,6 +323,66 @@
<title>X2:c&#45;&#45;X2:c</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M933.09,-207.75C933.09,-175.75 933.09,-143.75 933.09,-111.75"/>
</g>
<!-- __CIRCLE__1 -->
<g id="node4" class="node">
<title>__CIRCLE__1</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-229.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__2 -->
<g id="node5" class="node">
<title>__CIRCLE__2</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__3 -->
<g id="node6" class="node">
<title>__CIRCLE__3</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__4 -->
<g id="node7" class="node">
<title>__CIRCLE__4</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-85.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__5 -->
<g id="node8" class="node">
<title>__CIRCLE__5</title>
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-205.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__6 -->
<g id="node9" class="node">
<title>__CIRCLE__6</title>
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-109.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__7 -->
<g id="node10" class="node">
<title>__CIRCLE__7</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-231.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__8 -->
<g id="node11" class="node">
<title>__CIRCLE__8</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__9 -->
<g id="node12" class="node">
<title>__CIRCLE__9</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__10 -->
<g id="node13" class="node">
<title>__CIRCLE__10</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-87.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__11 -->
<g id="node14" class="node">
<title>__CIRCLE__11</title>
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-207.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__12 -->
<g id="node15" class="node">
<title>__CIRCLE__12</title>
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-111.75" rx="6.48" ry="6.48"/>
</g>
</g>
</svg>

BIN
examples/ex15.png generated

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 60 KiB

70
examples/ex15.svg generated
View File

@ -29,7 +29,6 @@
<polygon fill="none" stroke="black" points="0,-217.5 0,-241.5 58.88,-241.5 58.88,-217.5 0,-217.5"/>
<text text-anchor="start" x="13.69" y="-224.2" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="58.88,-217.5 58.88,-241.5 113.75,-241.5 113.75,-217.5 58.88,-217.5"/>
<text text-anchor="start" x="79.56" y="-225.23" font-family="Sans" font-size="12.00" fill="#ff66cc"></text>
<polygon fill="none" stroke="black" points="113.75,-217.5 113.75,-241.5 168.63,-241.5 168.63,-217.5 113.75,-217.5"/>
<polygon fill="none" stroke="black" points="168.63,-217.5 168.63,-241.5 204.5,-241.5 204.5,-217.5 168.63,-217.5"/>
<text text-anchor="start" x="182.44" y="-224.2" font-family="arial" font-size="14.00">1</text>
@ -37,7 +36,6 @@
<text text-anchor="start" x="14.06" y="-200.2" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="58.88,-193.5 58.88,-217.5 113.75,-217.5 113.75,-193.5 58.88,-193.5"/>
<polygon fill="none" stroke="black" points="113.75,-193.5 113.75,-217.5 168.63,-217.5 168.63,-193.5 113.75,-193.5"/>
<text text-anchor="start" x="134.44" y="-201.23" font-family="Sans" font-size="12.00" fill="#ff0000"></text>
<polygon fill="none" stroke="black" points="168.63,-193.5 168.63,-217.5 204.5,-217.5 204.5,-193.5 168.63,-193.5"/>
<text text-anchor="start" x="182.44" y="-200.2" font-family="arial" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="0,-169.5 0,-193.5 58.88,-193.5 58.88,-169.5 0,-169.5"/>
@ -55,7 +53,6 @@
<polygon fill="none" stroke="black" points="0,-121.5 0,-145.5 58.88,-145.5 58.88,-121.5 0,-121.5"/>
<text text-anchor="start" x="13.69" y="-128.2" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="58.88,-121.5 58.88,-145.5 113.75,-145.5 113.75,-121.5 58.88,-121.5"/>
<text text-anchor="start" x="79.56" y="-129.23" font-family="Sans" font-size="12.00" fill="#ff66cc"></text>
<polygon fill="none" stroke="black" points="113.75,-121.5 113.75,-145.5 168.63,-145.5 168.63,-121.5 113.75,-121.5"/>
<polygon fill="none" stroke="black" points="168.63,-121.5 168.63,-145.5 204.5,-145.5 204.5,-121.5 168.63,-121.5"/>
<text text-anchor="start" x="182.44" y="-128.2" font-family="arial" font-size="14.00">5</text>
@ -63,13 +60,11 @@
<text text-anchor="start" x="14.06" y="-104.2" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="58.88,-97.5 58.88,-121.5 113.75,-121.5 113.75,-97.5 58.88,-97.5"/>
<polygon fill="none" stroke="black" points="113.75,-97.5 113.75,-121.5 168.63,-121.5 168.63,-97.5 113.75,-97.5"/>
<text text-anchor="start" x="134.44" y="-105.23" font-family="Sans" font-size="12.00" fill="#ff0000"></text>
<polygon fill="none" stroke="black" points="168.63,-97.5 168.63,-121.5 204.5,-121.5 204.5,-97.5 168.63,-97.5"/>
<text text-anchor="start" x="182.44" y="-104.2" font-family="arial" font-size="14.00">6</text>
<polygon fill="none" stroke="black" points="0,-73.5 0,-97.5 58.88,-97.5 58.88,-73.5 0,-73.5"/>
<text text-anchor="start" x="13.69" y="-80.2" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="58.88,-73.5 58.88,-97.5 113.75,-97.5 113.75,-73.5 58.88,-73.5"/>
<text text-anchor="start" x="79.56" y="-81.23" font-family="Sans" font-size="12.00" fill="#ff66cc"></text>
<polygon fill="none" stroke="black" points="113.75,-73.5 113.75,-97.5 168.63,-97.5 168.63,-73.5 113.75,-73.5"/>
<polygon fill="none" stroke="black" points="168.63,-73.5 168.63,-97.5 204.5,-97.5 204.5,-73.5 168.63,-73.5"/>
<text text-anchor="start" x="182.44" y="-80.2" font-family="arial" font-size="14.00">7</text>
@ -218,7 +213,6 @@
<polygon fill="none" stroke="black" points="802.07,-219.75 802.07,-243.75 856.88,-243.75 856.88,-219.75 802.07,-219.75"/>
<text text-anchor="start" x="813.72" y="-226.45" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="856.88,-219.75 856.88,-243.75 907.69,-243.75 907.69,-219.75 856.88,-219.75"/>
<text text-anchor="start" x="875.54" y="-227.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="907.69,-219.75 907.69,-243.75 958.51,-243.75 958.51,-219.75 907.69,-219.75"/>
<polygon fill="none" stroke="black" points="770.26,-195.75 770.26,-219.75 802.07,-219.75 802.07,-195.75 770.26,-195.75"/>
<text text-anchor="start" x="782.04" y="-202.45" font-family="arial" font-size="14.00">2</text>
@ -226,7 +220,6 @@
<text text-anchor="start" x="814.1" y="-202.45" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="856.88,-195.75 856.88,-219.75 907.69,-219.75 907.69,-195.75 856.88,-195.75"/>
<polygon fill="none" stroke="black" points="907.69,-195.75 907.69,-219.75 958.51,-219.75 958.51,-195.75 907.69,-195.75"/>
<text text-anchor="start" x="926.35" y="-203.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="770.26,-171.75 770.26,-195.75 802.07,-195.75 802.07,-171.75 770.26,-171.75"/>
<text text-anchor="start" x="782.04" y="-178.45" font-family="arial" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="802.07,-171.75 802.07,-195.75 856.88,-195.75 856.88,-171.75 802.07,-171.75"/>
@ -244,7 +237,6 @@
<polygon fill="none" stroke="black" points="802.07,-123.75 802.07,-147.75 856.88,-147.75 856.88,-123.75 802.07,-123.75"/>
<text text-anchor="start" x="813.72" y="-130.45" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="856.88,-123.75 856.88,-147.75 907.69,-147.75 907.69,-123.75 856.88,-123.75"/>
<text text-anchor="start" x="875.54" y="-131.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="907.69,-123.75 907.69,-147.75 958.51,-147.75 958.51,-123.75 907.69,-123.75"/>
<polygon fill="none" stroke="black" points="770.26,-99.75 770.26,-123.75 802.07,-123.75 802.07,-99.75 770.26,-99.75"/>
<text text-anchor="start" x="782.04" y="-106.45" font-family="arial" font-size="14.00">6</text>
@ -252,13 +244,11 @@
<text text-anchor="start" x="814.1" y="-106.45" font-family="arial" font-size="14.00">VCC</text>
<polygon fill="none" stroke="black" points="856.88,-99.75 856.88,-123.75 907.69,-123.75 907.69,-99.75 856.88,-99.75"/>
<polygon fill="none" stroke="black" points="907.69,-99.75 907.69,-123.75 958.51,-123.75 958.51,-99.75 907.69,-99.75"/>
<text text-anchor="start" x="926.35" y="-107.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="770.26,-75.75 770.26,-99.75 802.07,-99.75 802.07,-75.75 770.26,-75.75"/>
<text text-anchor="start" x="782.04" y="-82.45" font-family="arial" font-size="14.00">7</text>
<polygon fill="none" stroke="black" points="802.07,-75.75 802.07,-99.75 856.88,-99.75 856.88,-75.75 802.07,-75.75"/>
<text text-anchor="start" x="813.72" y="-82.45" font-family="arial" font-size="14.00">GND</text>
<polygon fill="none" stroke="black" points="856.88,-75.75 856.88,-99.75 907.69,-99.75 907.69,-75.75 856.88,-75.75"/>
<text text-anchor="start" x="875.54" y="-83.48" font-family="Sans" font-size="12.00" fill="#000000"></text>
<polygon fill="none" stroke="black" points="907.69,-75.75 907.69,-99.75 958.51,-99.75 958.51,-75.75 907.69,-75.75"/>
</g>
<!-- W1&#45;&#45;X2 -->
@ -304,5 +294,65 @@
<title>X2:c&#45;&#45;X2:c</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M933.09,-207.75C933.09,-175.75 933.09,-143.75 933.09,-111.75"/>
</g>
<!-- __CIRCLE__1 -->
<g id="node4" class="node">
<title>__CIRCLE__1</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-229.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__2 -->
<g id="node5" class="node">
<title>__CIRCLE__2</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__3 -->
<g id="node6" class="node">
<title>__CIRCLE__3</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-133.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__4 -->
<g id="node7" class="node">
<title>__CIRCLE__4</title>
<ellipse fill="#ff66cc" stroke="#ff66cc" cx="86.31" cy="-85.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__5 -->
<g id="node8" class="node">
<title>__CIRCLE__5</title>
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-205.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__6 -->
<g id="node9" class="node">
<title>__CIRCLE__6</title>
<ellipse fill="#ff0000" stroke="#ff0000" cx="141.19" cy="-109.5" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__7 -->
<g id="node10" class="node">
<title>__CIRCLE__7</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-231.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__8 -->
<g id="node11" class="node">
<title>__CIRCLE__8</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__9 -->
<g id="node12" class="node">
<title>__CIRCLE__9</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-135.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__10 -->
<g id="node13" class="node">
<title>__CIRCLE__10</title>
<ellipse fill="#000000" stroke="#000000" cx="882.28" cy="-87.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__11 -->
<g id="node14" class="node">
<title>__CIRCLE__11</title>
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-207.75" rx="6.48" ry="6.48"/>
</g>
<!-- __CIRCLE__12 -->
<g id="node15" class="node">
<title>__CIRCLE__12</title>
<ellipse fill="#000000" stroke="#000000" cx="933.09" cy="-111.75" rx="6.48" ry="6.48"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

12
examples/ex16.gv generated
View File

@ -69,10 +69,10 @@ graph {
</table>
> fillcolor="#FFFFFF" shape=box style=filled]
edge [color="#000000:#FF66CC:#000000"]
X1:p1r:e -- X1:p5r:e [label="X1-LO1"]
X1:p5r:e -- X1:p7r:e [label="X1-LO1"]
X1:p1r:e -- X1:p5r:e [label=" "]
X1:p5r:e -- X1:p7r:e [label=" "]
edge [color="#000000:#FF0000:#0066FF:#FF8000:#A0DFFF:#000000"]
X1:p2r:e -- X1:p6r:e [label="X1-LO2"]
X1:p2r:e -- X1:p6r:e [label=" "]
edge [headclip=true style=bold tailclip=true]
X2 [label=<
<table border="0" cellspacing="0" cellpadding="0">
@ -133,10 +133,10 @@ graph {
</table>
> fillcolor="#FFFFFF" shape=box style=filled]
edge [color="#000000:#FF66CC:#000000"]
X2:p1l:w -- X2:p5l:w [label="X2-LO1"]
X2:p5l:w -- X2:p7l:w [label="X2-LO1"]
X2:p1l:w -- X2:p5l:w [label=" "]
X2:p5l:w -- X2:p7l:w [label=" "]
edge [color="#000000:#FF66CC:#000000"]
X2:p2l:w -- X2:p6l:w [label="X2-LO2"]
X2:p2l:w -- X2:p6l:w [label=" "]
edge [color="#000000:#895956:#000000"]
X1:p1r:e -- W1:w1:w
W1:w1:e -- X2:p1l:w

12
examples/ex16.html generated
View File

@ -92,7 +92,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M189.05,-260.67C215.94,-272.5 271.31,-272.5 269.31,-214.5 271.31,-156.5 215.94,-156.5 189.05,-168.34"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M188.25,-262.5C215.94,-274.5 271.31,-274.5 271.31,-214.5 271.31,-154.5 215.94,-154.5 188.25,-166.5"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M187.46,-264.34C215.94,-276.5 271.31,-276.5 273.31,-214.5 271.31,-152.5 215.94,-152.5 187.46,-164.67"/>
<text text-anchor="middle" x="296.44" y="-156.7" font-family="arial" font-size="14.00">X1&#45;LO1</text>
<text text-anchor="middle" x="273.19" y="-156.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X1&#45;&#45;X1 -->
<g id="edge2" class="edge">
@ -100,7 +100,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M189.05,-164.67C215.94,-176.5 271.31,-176.5 269.31,-142.5 271.31,-108.5 215.94,-108.5 189.05,-120.34"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M188.25,-166.5C215.94,-178.5 271.31,-178.5 271.31,-142.5 271.31,-106.5 215.94,-106.5 188.25,-118.5"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M187.46,-168.34C215.94,-180.5 271.31,-180.5 273.31,-142.5 271.31,-104.5 215.94,-104.5 187.46,-116.67"/>
<text text-anchor="middle" x="296.44" y="-156.7" font-family="arial" font-size="14.00">X1&#45;LO1</text>
<text text-anchor="middle" x="273.19" y="-156.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X1&#45;&#45;X1 -->
<g id="edge3" class="edge">
@ -111,7 +111,7 @@
<path fill="none" stroke="#ff8000" stroke-width="2" d="M187.85,-239.42C215.94,-251.5 271.31,-251.5 272.31,-190.5 271.31,-129.5 215.94,-129.5 187.85,-141.58"/>
<path fill="none" stroke="#a0dfff" stroke-width="2" d="M187.06,-241.25C215.94,-253.5 271.31,-253.5 274.31,-190.5 271.31,-127.5 215.94,-127.5 187.06,-139.75"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M186.26,-243.09C215.94,-255.5 271.31,-255.5 276.31,-190.5 271.31,-125.5 215.94,-125.5 186.26,-137.91"/>
<text text-anchor="middle" x="296.44" y="-156.7" font-family="arial" font-size="14.00">X1&#45;LO2</text>
<text text-anchor="middle" x="273.19" y="-156.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- W1 -->
<g id="node2" class="node">
@ -293,7 +293,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M754.76,-264.85C724.71,-277 666.12,-277 664.12,-215 666.12,-153 724.71,-153 754.76,-165.15"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M754,-263C724.71,-275 666.12,-275 666.12,-215 666.12,-155 724.71,-155 754,-167"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M753.24,-261.15C724.71,-273 666.12,-273 668.12,-215 666.12,-157 724.71,-157 753.24,-168.85"/>
<text text-anchor="middle" x="641" y="-177.7" font-family="arial" font-size="14.00">X2&#45;LO1</text>
<text text-anchor="middle" x="664.25" y="-177.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X2&#45;&#45;X2 -->
<g id="edge19" class="edge">
@ -301,7 +301,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M754.76,-168.85C724.71,-181 666.12,-181 664.12,-143 666.12,-105 724.71,-105 754.76,-117.15"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M754,-167C724.71,-179 666.12,-179 666.12,-143 666.12,-107 724.71,-107 754,-119"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M753.24,-165.15C724.71,-177 666.12,-177 668.12,-143 666.12,-109 724.71,-109 753.24,-120.85"/>
<text text-anchor="middle" x="641" y="-177.7" font-family="arial" font-size="14.00">X2&#45;LO1</text>
<text text-anchor="middle" x="664.25" y="-177.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X2&#45;&#45;X2 -->
<g id="edge20" class="edge">
@ -309,7 +309,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M754.76,-240.85C724.71,-253 666.12,-253 664.12,-191 666.12,-129 724.71,-129 754.76,-141.15"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M754,-239C724.71,-251 666.12,-251 666.12,-191 666.12,-131 724.71,-131 754,-143"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M753.24,-237.15C724.71,-249 666.12,-249 668.12,-191 666.12,-133 724.71,-133 753.24,-144.85"/>
<text text-anchor="middle" x="641" y="-177.7" font-family="arial" font-size="14.00">X2&#45;LO2</text>
<text text-anchor="middle" x="664.25" y="-177.7" font-family="arial" font-size="14.00"> </text>
</g>
</g>
</svg>

BIN
examples/ex16.png generated

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 97 KiB

12
examples/ex16.svg generated
View File

@ -63,7 +63,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M189.05,-260.67C215.94,-272.5 271.31,-272.5 269.31,-214.5 271.31,-156.5 215.94,-156.5 189.05,-168.34"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M188.25,-262.5C215.94,-274.5 271.31,-274.5 271.31,-214.5 271.31,-154.5 215.94,-154.5 188.25,-166.5"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M187.46,-264.34C215.94,-276.5 271.31,-276.5 273.31,-214.5 271.31,-152.5 215.94,-152.5 187.46,-164.67"/>
<text text-anchor="middle" x="296.44" y="-156.7" font-family="arial" font-size="14.00">X1&#45;LO1</text>
<text text-anchor="middle" x="273.19" y="-156.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X1&#45;&#45;X1 -->
<g id="edge2" class="edge">
@ -71,7 +71,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M189.05,-164.67C215.94,-176.5 271.31,-176.5 269.31,-142.5 271.31,-108.5 215.94,-108.5 189.05,-120.34"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M188.25,-166.5C215.94,-178.5 271.31,-178.5 271.31,-142.5 271.31,-106.5 215.94,-106.5 188.25,-118.5"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M187.46,-168.34C215.94,-180.5 271.31,-180.5 273.31,-142.5 271.31,-104.5 215.94,-104.5 187.46,-116.67"/>
<text text-anchor="middle" x="296.44" y="-156.7" font-family="arial" font-size="14.00">X1&#45;LO1</text>
<text text-anchor="middle" x="273.19" y="-156.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X1&#45;&#45;X1 -->
<g id="edge3" class="edge">
@ -82,7 +82,7 @@
<path fill="none" stroke="#ff8000" stroke-width="2" d="M187.85,-239.42C215.94,-251.5 271.31,-251.5 272.31,-190.5 271.31,-129.5 215.94,-129.5 187.85,-141.58"/>
<path fill="none" stroke="#a0dfff" stroke-width="2" d="M187.06,-241.25C215.94,-253.5 271.31,-253.5 274.31,-190.5 271.31,-127.5 215.94,-127.5 187.06,-139.75"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M186.26,-243.09C215.94,-255.5 271.31,-255.5 276.31,-190.5 271.31,-125.5 215.94,-125.5 186.26,-137.91"/>
<text text-anchor="middle" x="296.44" y="-156.7" font-family="arial" font-size="14.00">X1&#45;LO2</text>
<text text-anchor="middle" x="273.19" y="-156.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- W1 -->
<g id="node2" class="node">
@ -264,7 +264,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M754.76,-264.85C724.71,-277 666.12,-277 664.12,-215 666.12,-153 724.71,-153 754.76,-165.15"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M754,-263C724.71,-275 666.12,-275 666.12,-215 666.12,-155 724.71,-155 754,-167"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M753.24,-261.15C724.71,-273 666.12,-273 668.12,-215 666.12,-157 724.71,-157 753.24,-168.85"/>
<text text-anchor="middle" x="641" y="-177.7" font-family="arial" font-size="14.00">X2&#45;LO1</text>
<text text-anchor="middle" x="664.25" y="-177.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X2&#45;&#45;X2 -->
<g id="edge19" class="edge">
@ -272,7 +272,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M754.76,-168.85C724.71,-181 666.12,-181 664.12,-143 666.12,-105 724.71,-105 754.76,-117.15"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M754,-167C724.71,-179 666.12,-179 666.12,-143 666.12,-107 724.71,-107 754,-119"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M753.24,-165.15C724.71,-177 666.12,-177 668.12,-143 666.12,-109 724.71,-109 753.24,-120.85"/>
<text text-anchor="middle" x="641" y="-177.7" font-family="arial" font-size="14.00">X2&#45;LO1</text>
<text text-anchor="middle" x="664.25" y="-177.7" font-family="arial" font-size="14.00"> </text>
</g>
<!-- X2&#45;&#45;X2 -->
<g id="edge20" class="edge">
@ -280,7 +280,7 @@
<path fill="none" stroke="#000000" stroke-width="2" d="M754.76,-240.85C724.71,-253 666.12,-253 664.12,-191 666.12,-129 724.71,-129 754.76,-141.15"/>
<path fill="none" stroke="#ff66cc" stroke-width="2" d="M754,-239C724.71,-251 666.12,-251 666.12,-191 666.12,-131 724.71,-131 754,-143"/>
<path fill="none" stroke="#000000" stroke-width="2" d="M753.24,-237.15C724.71,-249 666.12,-249 668.12,-191 666.12,-133 724.71,-133 753.24,-144.85"/>
<text text-anchor="middle" x="641" y="-177.7" font-family="arial" font-size="14.00">X2&#45;LO2</text>
<text text-anchor="middle" x="664.25" y="-177.7" font-family="arial" font-size="14.00"> </text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -22,6 +22,7 @@ from wireviz.DataClasses import (
Options,
Tweak,
Side,
Image,
)
from wireviz.svgembed import embed_svg_images_file
from wireviz.wv_bom import (
@ -281,7 +282,26 @@ class Harness:
shColor = shortComp.color
if pinindex+1 in shortPins:
pinhtml.append(f' <td port="p{pinindex+1}J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="{wv_colors.translate_color(shColor, "HEX")}">&#11044;</FONT></td>')
# path = os.getcwd().replace('\\', '/')
# blackCircle = Image(src=f"{path}/images/circle_5mm_96dpi.png") # , width = 5, height = 5, fixedsize = True circle_5mm_96dpi.png
# from cairosvg import svg2png
# svg_code = """
# <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
# <circle cx="12" cy="12" r="10"/>
# <line x1="12" y1="8" x2="12" y2="12"/>
# <line x1="12" y1="16" x2="12" y2="16"/>
# </svg>
# """
# svg2png(bytestring=svg_code,write_to= f'{path}/output.png')
# pinhtml.append(f' <td port="p{pinindex+1}J">{html_image(blackCircle).replace("<tdX>", "")}</td>')
pinhtml.append(f' <td width="21" port="p{pinindex+1}J"></td>')
# pinhtml.append(f' <td port="p{pinindex+1}J"><FONT FACE="Sans" POINT-SIZE="12.0" COLOR="{wv_colors.translate_color(shColor, "HEX")}">&#11044;</FONT></td>')
else:
pinhtml.append(f' <td></td>')
@ -312,7 +332,9 @@ class Harness:
dot.edge(
f"{connector.name}:p{shortPins[i - 1]}j:c",
f"{connector.name}:p{shortPins[i]}j:c",
straight="straight"
straight="straight",
addPTS=".18",
colorPTS=str(wv_colors.translate_color(shColor, "HEX")),
)
dot.attr("edge", headclip="true", tailclip="true", style="bold")
@ -744,8 +766,9 @@ class Harness:
def graphRender(self, type, filename, graph):
if find_executable("dot") and find_executable("gvpr") and find_executable("neato"):
os.environ['GVPRPATH'] = str(Path(__file__).parent)
graph.save(filename=f"{filename}_tmp.gv")
os.system(f"dot {filename}_tmp.gv | gvpr -q -cf pin2pin.gvpr | neato -n2 -T{type} -o {filename}.{type}")
os.system(f"dot {filename}_tmp.gv | gvpr -q -cf pin2pin.gvpr | neato -n2 -T{type} -o {filename}.{type}")#{':cairo'if type == 'svg' else ''}
os.remove(f"{filename}_tmp.gv")
else:
graph.render(filename=filename) # old rendering methode, befor jumper implementations

37
src/wireviz/images/circle_5mm.svg generated Normal file
View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="5mm"
height="5mm"
viewBox="0 0 5 5"
version="1.1"
id="svg1"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm" />
<defs
id="defs1" />
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="fill:#000000;stroke-width:0.264583;stroke-dasharray:2.11667, 1.05833"
id="path1"
cx="2.5"
cy="2.5"
r="2.5" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 999 B

BIN
src/wireviz/images/circle_5mm_96dpi.png generated Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View File

@ -1,14 +1,17 @@
/*******************************************************************
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
input must include pos values (must be output from one of the engines w/ -Tdot)#
Thanks to steveroush and FeRDNYC
*******************************************************************/
BEG_G{
double x1,y1,x2,y2,x3,y3,x4,y4;
string tok[int];
int cnt;
string ptSize, tok[int], pt[];
int cnt, circ, i;
node_t aNode;
circ=0;
/***************************************
$G.bb="";
@ -31,4 +34,24 @@ E[straight] {
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
$.label=""; // remove pesky label
$.lp=""; // remove peskier label pos
if (hasAttr($, "addPTS") && $.addPTS!=""){
// now we place point nodes at the edge ends
pt[1] = tok[0];
pt[2] = tok[cnt-1];
ptSize=$.addPTS;
for (pt[i]) {
if (i==2 && pt[1]==pt[2])
continue;
aNode=node($G, "__CIRCLE__" + (string)++circ);
aNode.pos=pt[i];
aNode.shape="point";
aNode.width=ptSize;
aNode.height=ptSize;
aNode.style="filled";
aNode.fillcolor=$.colorPTS;
aNode.color=$.colorPTS;
}
}
}