Skip to content

Commit

Permalink
reimplemeted
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasfalk committed Jul 8, 2024
1 parent 23e7737 commit b42db95
Show file tree
Hide file tree
Showing 171 changed files with 31,062 additions and 18,827 deletions.
416 changes: 248 additions & 168 deletions examples/demo01.gv

Large diffs are not rendered by default.

340 changes: 187 additions & 153 deletions examples/demo01.html

Large diffs are not rendered by default.

Binary file modified examples/demo01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
310 changes: 172 additions & 138 deletions examples/demo01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions examples/demo01.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/demo01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ connectors:
subtype: female
pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
loops:
- [7,8]
L1: [7,8]
X2:
type: Molex KK 254
subtype: female
Expand Down
64 changes: 64 additions & 0 deletions examples/demo01_wv_gvpr.gvpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*******************************************************************

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 ptSize, tok[int], pt[];
int cnt, circ, i;
node_t aNode;

circ=0;

/***************************************
$G.bb="";
$G.nodesep="";
$G.ranksep="";
$G.splines="true";
****************************************/
}

// This removes the label text but keeps the position
E[noLabel] {
$.label=""; // remove pesky label
// $.lp=""; // remove peskier label pos
}

E[straight] {
cnt=tokens($.pos,tok," ");
$.oldpos=$.pos;
x1 = xOf(tok[0]);
y1 = yOf(tok[0]);
x4 = xOf(tok[cnt-1]);
y4 = yOf(tok[cnt-1]);
x2 = x1 + (x4-x1)/3.;
y2 = y1 + (y4-y1)/3.;
x3 = x1 + 2.*(x4-x1)/3.;
y3 = y1 + 2.*(y4-y1)/3.;
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!="" && $.colorPTS!=""){
// 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;
}
}

}
Loading

0 comments on commit b42db95

Please sign in to comment.