]> granicus.if.org Git - graphviz/commitdiff
Added support for table rules and test cases.
authordperry <devnull@localhost>
Wed, 6 Jul 2011 21:15:02 +0000 (21:15 +0000)
committerdperry <devnull@localhost>
Wed, 6 Jul 2011 21:15:02 +0000 (21:15 +0000)
14 files changed:
lib/common/htmltable.c
rtest/graphs/rd_tbl_all.gv [new file with mode: 0644]
rtest/graphs/rd_tbl_basic.gv [new file with mode: 0644]
rtest/graphs/rd_tbl_border.gv [new file with mode: 0644]
rtest/graphs/sq_tbl_all.gv [new file with mode: 0644]
rtest/graphs/sq_tbl_basic.gv [new file with mode: 0644]
rtest/graphs/sq_tbl_border.gv [new file with mode: 0644]
rtest/nshare/rd_tbl_all_dot.png [new file with mode: 0644]
rtest/nshare/rd_tbl_basic_dot.png [new file with mode: 0644]
rtest/nshare/rd_tbl_border_dot.png [new file with mode: 0644]
rtest/nshare/sq_tbl_all_dot.png [new file with mode: 0644]
rtest/nshare/sq_tbl_basic_dot.png [new file with mode: 0644]
rtest/nshare/sq_tbl_border_dot.png [new file with mode: 0644]
rtest/table_rules_test.txt [new file with mode: 0644]

index 2df92cda7ffa8c91b68fba21477e8e851bdf3b4b..d4c0a347ed31cd39ba3fbf4c5c2111808a0326e9 100644 (file)
@@ -348,6 +348,7 @@ endAnchor (GVJ_t* job, htmlmap_data_t* save, int openPrev)
 
 /* forward declaration */
 static void emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env);
+static void emit_html_rules(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env, char *fillc);
 
 static void
 emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env)
@@ -392,6 +393,12 @@ emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env)
        if (tbl->data.border)
            doBorder(job, tbl->data.pencolor, tbl->data.border, pts);
     }
+    //render table rules
+    while (*cells){
+       emit_html_rules(job, *cells, env, tbl->data.bgcolor);
+       cells++;
+    }
+    cells = tbl->u.n.cells;
 
     while (*cells) {
        emit_html_cell(job, *cells, env);
@@ -482,6 +489,73 @@ emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env)
     }
 }
 
+/* emit_html_rules:
+ * place vertical and horizontal lines between adjacent cells and
+ * extend the lines to intersect the rounded table boundary 
+ */
+static void
+emit_html_rules(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env, char *color)
+{
+    pointf rule_pt;
+    double rule_length;
+    unsigned char base;
+    boxf pts = cp->data.box;
+    pointf pos = env->pos;
+    
+    if (!color)
+       color = DEFAULT_COLOR;
+    gvrender_set_fillcolor(job, color);
+    gvrender_set_pencolor(job, color);
+
+    pts = cp->data.box;
+    pts.LL.x += pos.x;
+    pts.UR.x += pos.x;
+    pts.LL.y += pos.y;
+    pts.UR.y += pos.y;
+
+    //Determine vertical line coordinate and length
+    if (cp->col + cp->cspan < cp->parent->cc){
+       if(cp->row == 0) {  //first row
+               //extend to table border and add half cell spacing
+               base = cp->parent->data.border + cp->parent->data.space/2;
+               rule_pt.y = pts.LL.y - cp->parent->data.space/2; 
+       }
+       else if(cp->row + cp->rspan == cp->parent->rc){  //bottom row
+               //extend to table border and add half cell spacing
+               base = cp->parent->data.border + cp->parent->data.space/2;
+               rule_pt.y = pts.LL.y - cp->parent->data.space/2 - base;
+       }
+       else{
+               base = 0;
+               rule_pt.y = pts.LL.y - cp->parent->data.space/2;
+       }
+       rule_pt.x = pts.UR.x + cp->parent->data.space/2;
+       rule_length = base + pts.UR.y - pts.LL.y + cp->parent->data.space;
+       doSide(job,rule_pt,0,rule_length);
+    }
+//Determine the horizontal coordinate and length
+    if(cp->row + cp->rspan < cp->parent->rc){
+       if(cp->col == 0) { //first column 
+               //extend to table border and add half cell spacing
+               base = cp->parent->data.border + cp->parent->data.space/2;
+               rule_pt.x = pts.LL.x - base - cp->parent->data.space/2;
+       }
+       else if(cp->col + cp->cspan == cp->parent->cc){  //last column
+               //extend to table border and add half cell spacing
+               base = cp->parent->data.border + cp->parent->data.space/2;
+               rule_pt.x = pts.LL.x - cp->parent->data.space/2;
+       }
+       else{
+               base = 0;
+                 rule_pt.x = pts.LL.x - cp->parent->data.space/2;
+       }
+       rule_pt.y = pts.LL.y - cp->parent->data.space/2;
+       rule_length = base + pts.UR.x - pts.LL.x + cp->parent->data.space;
+       doSide(job,rule_pt,rule_length,0);
+    }
+
+}
+
 /* allocObj:
  * Push new obj on stack to be used in common by all 
  * html elements with anchors.
diff --git a/rtest/graphs/rd_tbl_all.gv b/rtest/graphs/rd_tbl_all.gv
new file mode 100644 (file)
index 0000000..e44b550
--- /dev/null
@@ -0,0 +1,50 @@
+digraph G {
+ subgraph cluster_base{
+ label = "table border:10,cellspacing:10,cellpadding:0,cell border:0";
+ node [shape=plaintext]
+ tbl1100 [label=<
+ <TABLE border="10" cellspacing="10" cellpadding="0" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_table_border {
+ label="table border:10,cellspacing:0,cellpadding:10,cell border:0";
+ node [shape=plaintext]
+ tbl1010 [label=<
+ <TABLE border="10" cellspacing="0" cellpadding="10" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellspacing {
+ label="table border:10,cellspacing:10,cellpadding:10,cell border:0";
+ node [shape=plaintext]
+ tbl1110 [label=<
+ <TABLE border="10" cellspacing="10" cellpadding="10" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellpadding {
+ label="table border:10,cellspacing:10,cellpadding:10,cell border:3";
+ node [shape=plaintext]
+ tbl1111 [label=<
+ <TABLE border="10" cellspacing="10" cellpadding="10" style="rounded">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+} 
diff --git a/rtest/graphs/rd_tbl_basic.gv b/rtest/graphs/rd_tbl_basic.gv
new file mode 100644 (file)
index 0000000..79b0b31
--- /dev/null
@@ -0,0 +1,50 @@
+digraph G {
+ subgraph cluster_base{
+ label = "table border:0,cellspacing:0,cellpadding:0,cell border:0";
+ node [shape=plaintext,rank=min]
+ tbl0000 [label=<
+ <TABLE border="0" cellspacing="0" cellpadding="0" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="1">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_table_border {
+ label="table border:10,cellspacing:0,cellpadding:0,cell border:0";
+ node [shape=plaintext]
+ tbl1000 [label=<
+ <TABLE border="10" cellspacing="0" cellpadding="0" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellspacing {
+ label="table border:0,cellspacing:10,cellpadding:0,cell border:0";
+ node [shape=plaintext]
+ tbl0100 [label=<
+ <TABLE border="0" cellspacing="10" cellpadding="0" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellpadding {
+ label="table border:0,cellspacing:0,cellpadding:10,cell border:0";
+ node [shape=plaintext]
+ tbl0010 [label=<
+ <TABLE border="0" cellspacing="0" cellpadding="10" style="rounded">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+} 
diff --git a/rtest/graphs/rd_tbl_border.gv b/rtest/graphs/rd_tbl_border.gv
new file mode 100644 (file)
index 0000000..3082fdd
--- /dev/null
@@ -0,0 +1,50 @@
+digraph G {
+ subgraph cluster_base{
+ label = "table border:0,cellspacing:0,cellpadding:0,cell border:3";
+ node [shape=plaintext]
+ tbl0001 [label=<
+ <TABLE border="0" cellspacing="0" cellpadding="0" style="rounded">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_table_border {
+ label="table border:10,cellspacing:0,cellpadding:0,cell border:3";
+ node [shape=plaintext]
+ tbl1001 [label=<
+ <TABLE border="10" cellspacing="0" cellpadding="0" style="rounded">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellspacing {
+ label="table border:0,cellspacing:10,cellpadding:0,cell border:3";
+ node [shape=plaintext]
+ tbl0101 [label=<
+ <TABLE border="0" cellspacing="10" cellpadding="0" style="rounded">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellpadding {
+ label="table border:0,cellspacing:0,cellpadding:10,cell border:3";
+ node [shape=plaintext]
+ tbl0011 [label=<
+ <TABLE border="0" cellspacing="0" cellpadding="10" style="rounded">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+} 
diff --git a/rtest/graphs/sq_tbl_all.gv b/rtest/graphs/sq_tbl_all.gv
new file mode 100644 (file)
index 0000000..03d5b5f
--- /dev/null
@@ -0,0 +1,50 @@
+digraph G {
+ subgraph cluster_base{
+ label = "table border:10,cellspacing:10,cellpadding:0,cell border:0";
+ node [shape=plaintext]
+ tbl1100 [label=<
+ <TABLE border="10" cellspacing="10" cellpadding="0">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_table_border {
+ label="table border:10,cellspacing:0,cellpadding:10,cell border:0";
+ node [shape=plaintext]
+ tbl1010 [label=<
+ <TABLE border="10" cellspacing="0" cellpadding="10">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellspacing {
+ label="table border:10,cellspacing:10,cellpadding:10,cell border:0";
+ node [shape=plaintext]
+ tbl1110 [label=<
+ <TABLE border="10" cellspacing="10" cellpadding="10">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellpadding {
+ label="table border:10,cellspacing:10,cellpadding:10,cell border:3";
+ node [shape=plaintext]
+ tbl1111 [label=<
+ <TABLE border="10" cellspacing="10" cellpadding="10">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+} 
diff --git a/rtest/graphs/sq_tbl_basic.gv b/rtest/graphs/sq_tbl_basic.gv
new file mode 100644 (file)
index 0000000..789278a
--- /dev/null
@@ -0,0 +1,50 @@
+digraph G {
+ subgraph cluster_base{
+ label = "table border:0,cellspacing:0,cellpadding:0,cell border:0";
+ node [shape=plaintext,rank=min]
+ tbl0000 [label=<
+ <TABLE border="0" cellspacing="0" cellpadding="0">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="1">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_table_border {
+ label="table border:1,cellspacing:0,cellpadding:0,cell border:0";
+ node [shape=plaintext]
+ tbl1000 [label=<
+ <TABLE border="1" cellspacing="0" cellpadding="0">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellspacing {
+ label="table border:1,cellspacing:10,cellpadding:0,cell border:0";
+ node [shape=plaintext]
+ tbl1100 [label=<
+ <TABLE border="1" cellspacing="10" cellpadding="0">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellpadding {
+ label="table border:1,cellspacing:0,cellpadding:10,cell border:0";
+ node [shape=plaintext]
+ tbl1010 [label=<
+ <TABLE border="1" cellspacing="0" cellpadding="10">
+  <TR><TD border="0">00</TD><TD border="0">01</TD><TD border="0">02</TD><TD border="0">03</TD></TR>
+  <TR><TD border="0">10</TD><TD border="0" rowspan="2">11</TD><TD border="0">12</TD><TD border="0">13</TD></TR>
+  <TR><TD border="0">20</TD><TD border="0" colspan="2">22</TD></TR>
+  <TR><TD border="0">30</TD><TD border="0">31</TD><TD border="0">32</TD><TD border="0">33</TD></TR>
+</TABLE>>];
+}
+
+} 
diff --git a/rtest/graphs/sq_tbl_border.gv b/rtest/graphs/sq_tbl_border.gv
new file mode 100644 (file)
index 0000000..b00fd2d
--- /dev/null
@@ -0,0 +1,50 @@
+digraph G {
+ subgraph cluster_base{
+ label = "table border:0,cellspacing:0,cellpadding:0,cell border:3";
+ node [shape=plaintext]
+ tbl0001 [label=<
+ <TABLE border="0" cellspacing="0" cellpadding="0">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_table_border {
+ label="table border:10,cellspacing:0,cellpadding:0,cell border:3";
+ node [shape=plaintext]
+ tbl1001 [label=<
+ <TABLE border="10" cellspacing="0" cellpadding="0">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellspacing {
+ label="table border:1,cellspacing:10,cellpadding:0,cell border:3";
+ node [shape=plaintext]
+ tbl1101 [label=<
+ <TABLE border="1" cellspacing="10" cellpadding="0">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+ subgraph cluster_cellpadding {
+ label="table border:1,cellspacing:0,cellpadding:10,cell border:3";
+ node [shape=plaintext]
+ tbl1011 [label=<
+ <TABLE border="1" cellspacing="0" cellpadding="10">
+  <TR><TD border="3">00</TD><TD border="3">01</TD><TD border="3">02</TD><TD border="3">03</TD></TR>
+  <TR><TD border="3">10</TD><TD border="3" rowspan="2">11</TD><TD border="3">12</TD><TD border="3">13</TD></TR>
+  <TR><TD border="3">20</TD><TD border="3" colspan="2">22</TD></TR>
+  <TR><TD border="3">30</TD><TD border="3">31</TD><TD border="3">32</TD><TD border="3">33</TD></TR>
+</TABLE>>];
+}
+
+} 
diff --git a/rtest/nshare/rd_tbl_all_dot.png b/rtest/nshare/rd_tbl_all_dot.png
new file mode 100644 (file)
index 0000000..100321f
Binary files /dev/null and b/rtest/nshare/rd_tbl_all_dot.png differ
diff --git a/rtest/nshare/rd_tbl_basic_dot.png b/rtest/nshare/rd_tbl_basic_dot.png
new file mode 100644 (file)
index 0000000..eb2f062
Binary files /dev/null and b/rtest/nshare/rd_tbl_basic_dot.png differ
diff --git a/rtest/nshare/rd_tbl_border_dot.png b/rtest/nshare/rd_tbl_border_dot.png
new file mode 100644 (file)
index 0000000..c0e97a8
Binary files /dev/null and b/rtest/nshare/rd_tbl_border_dot.png differ
diff --git a/rtest/nshare/sq_tbl_all_dot.png b/rtest/nshare/sq_tbl_all_dot.png
new file mode 100644 (file)
index 0000000..4e49ed7
Binary files /dev/null and b/rtest/nshare/sq_tbl_all_dot.png differ
diff --git a/rtest/nshare/sq_tbl_basic_dot.png b/rtest/nshare/sq_tbl_basic_dot.png
new file mode 100644 (file)
index 0000000..4945fb1
Binary files /dev/null and b/rtest/nshare/sq_tbl_basic_dot.png differ
diff --git a/rtest/nshare/sq_tbl_border_dot.png b/rtest/nshare/sq_tbl_border_dot.png
new file mode 100644 (file)
index 0000000..ae19aee
Binary files /dev/null and b/rtest/nshare/sq_tbl_border_dot.png differ
diff --git a/rtest/table_rules_test.txt b/rtest/table_rules_test.txt
new file mode 100644 (file)
index 0000000..8bc050b
--- /dev/null
@@ -0,0 +1,44 @@
+# Graphviz test suite
+# Tests are separated by blank or comment lines.
+# Tests have the following syntax:
+#  testname
+#  Test input (one-line graph or name of .gv file or =)
+#    In the last case, the input file is taken as testname.gv
+#  One or more subtests of the form: 
+#     layout_alg output_format additional_flags
+#  
+# For example, the test
+#   Shapes
+#   shapes.gv
+#   dot ps
+#   neato png "-Gsize=3,3 -Ncolor=red"
+# specifies the "shapes" test, using shapes.gv as input, and
+# run "dot -Tps" and "neato -Tpng -Gsize=3,3 -Ncolor=red" on the input.
+
+rd_tbl_basic
+=
+dot png
+
+rd_tbl_border
+=
+dot png
+
+rd_tbl_all
+=
+dot png
+
+sq_tbl_basic
+=
+dot png
+
+sq_tbl_border
+=
+dot png
+
+sq_tbl_all
+=
+dot png
+
+
+
+