return 0;
}
+static int stylefn(htmltbl_t * p, char *v)
+{
+ int rv = 0;
+ char c = toupper(*v);
+ if ((c == 'R') && !strcasecmp(v + 1, "OUNDED"))
+ p->style = ROUNDED;
+ else {
+ agerr(AGWARN, "Illegal value %s for STYLE - ignored\n", v);
+ rv = 1;
+ }
+ return rv;
+}
+
static int targetfn(htmldata_t * p, char *v)
{
p->target = strdup(v);
{"href", (attrFn) hreffn},
{"id", (attrFn) idfn},
{"port", (attrFn) portfn},
+ {"style", (attrFn) stylefn},
{"target", (attrFn) targetfn},
{"title", (attrFn) titlefn},
{"tooltip", (attrFn) titlefn},
else
anchor = 0;
- if (tbl->data.bgcolor)
- doFill(job, tbl->data.bgcolor, pts);
+ if (tbl->style & ROUNDED) {
+ pointf AF[4];
+ char* color = (tbl->data.pencolor ? tbl->data.pencolor : DEFAULT_COLOR);
+ AF[0] = pts.LL;
+ AF[2] = pts.UR;
+ AF[1].x = AF[2].x;
+ AF[1].y = AF[0].y;
+ AF[3].x = AF[0].x;
+ AF[3].y = AF[2].y;
+ round_corners (job, tbl->data.bgcolor, color, AF, 4, tbl->style,
+ (tbl->data.bgcolor != NULL));
+ }
+ else {
+ if (tbl->data.bgcolor)
+ doFill(job, tbl->data.bgcolor, pts);
- if (tbl->data.border)
- doBorder(job, tbl->data.pencolor, tbl->data.border, pts);
+ if (tbl->data.border)
+ doBorder(job, tbl->data.pencolor, tbl->data.border, pts);
+ }
while (*cells) {
emit_html_cell(job, *cells, env);
int rc; /* number of rows */
int cc; /* number of columns */
htmlfont_t *font; /* font info */
+ unsigned char style;
};
struct htmllabel_t {