From 1ca22e1da149a3d1c696c489eeff8ad0366b2f29 Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 20 May 2005 03:40:14 +0000 Subject: [PATCH] Finish support for using node color/pencolor to set table and cell border color. --- lib/common/htmltable.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 4c39f671e..75753a291 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -264,7 +264,7 @@ emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env, void *obj) } if (tbl->data.border) - doBorder(job, NULL, tbl->data.border, pts); + doBorder(job, tbl->data.pencolor, tbl->data.border, pts); if (tbl->data.href) doAnchorEnd(job); @@ -322,7 +322,7 @@ emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env, void *obj) emit_html_txt(job, cp->child.u.txt, env, obj); if (cp->data.border) - doBorder(job, NULL, cp->data.border, pts); + doBorder(job, cp->data.pencolor, cp->data.border, pts); if (cp->data.href) doAnchorEnd(job); @@ -1032,6 +1032,9 @@ static void pos_html_cell(htmlcell_t * cp, box pos, int sides) point oldsz; box cbox; + if (!cp->data.pencolor) + cp->data.pencolor = cp->parent->data.pencolor; + /* If fixed, align cell */ if (cp->data.flags & FIXED_FLAG) { oldsz = cp->data.box.UR; @@ -1131,6 +1134,9 @@ static void pos_html_tbl(htmltbl_t * tbl, box pos, int sides) htmlcell_t *cp; box cbox; + if (tbl->u.n.parent && !tbl->data.pencolor) + tbl->data.pencolor = tbl->u.n.parent->data.pencolor; + oldsz = tbl->data.box.UR.x; delx = (pos.UR.x - pos.LL.x) - oldsz; assert(delx >= 0); -- 2.40.0