nturley / netlistsvg

draws an SVG schematic from a JSON netlist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

patch for correct OR and NOR gates shapes in default.svg

Popolon opened this issue · comments

Currently, in default.svg the right part of the OR and NOR gates shapes are like an AND gate (rounded), not like an OR gate (sharp, like current XOR and XNOR).

Here is a small patch to have correct OR and NOR shapes.

diff --git a/lib/default.svg b/lib/default.svg
index 91d7c40..5840705 100644
--- a/lib/default.svg
+++ b/lib/default.svg
@@ -114,8 +114,7 @@ line {
     <s:alias val="$logic_or"/>
     <s:alias val="$_OR_"/>
 
-    <path d="M0,25 L0,25 L15,25 A15 12.5 0 0 0 15,0 L0,0" class="$cell_id"/>
-    <path d="M0,0 A30 25 0 0 1 0,25" class="$cell_id"/>
+    <path d="M0,0 A30 25 0 0 1 0,25 A30 25 0 0 0 30,12.5 A30 25 0 0 0 0,0" class="$cell_id"/>
 
     <g s:x="2" s:y="5" s:pid="A"/>
     <g s:x="2" s:y="20" s:pid="B"/>
@@ -127,8 +126,7 @@ line {
     <s:alias val="$_NOR_"/>
     <s:alias val="$_ORNOT_"/>
 
-    <path d="M0,25 L0,25 L15,25 A15 12.5 0 0 0 15,0 L0,0" class="$cell_id"/>
-    <path d="M0,0 A30 25 0 0 1 0,25" class="$cell_id"/>
+    <path d="M0,0 A30 25 0 0 1 0,25 A30 25 0 0 0 31,12.5 A30 25 0 0 0 0,0" class="$cell_id"/>
     <circle cx="34" cy="12.5" r="3" class="$cell_id"/>
 
     <g s:x="2" s:y="5" s:pid="A"/>

patch_or_nor

I can incorporate this into #104. Thank you!