splinesf offspl, tmpspl;
pointf pf0, pf1, pf2 = { 0, 0 }, pf3, *offlist, *tmplist;
double scale, numc2;
+ double penwidth;
char *p;
#define SEP 2.0
scale = late_double(e, E_arrowsz, 1.0, 0.0);
color = late_string(e, E_color, "");
- if (color[0] || styles) {
- if (styles)
- gvrender_set_style(job, styles);
- }
+ if (styles) gvrender_set_style(job, styles);
+
/* need to know how many colors separated by ':' */
for (p = color; *p; p++)
if (*p == ':')
default_pencolor(pencolor, DEFAULT_VISITEDPENCOLOR));
fillcolor = late_nnstring(e, E_visitedfillcolor, DEFAULT_VISITEDFILLCOLOR);
}
+ if (E_penwidth && agxget(e,E_penwidth->index)) {
+ penwidth = late_double(e, E_penwidth, 1.0, 0.0);
+ gvrender_set_penwidth(job, penwidth);
+ }
if (pencolor != color)
gvrender_set_pencolor(job, pencolor);
if (fillcolor != color)
*E_headlabel, *E_taillabel,
*E_labelfontsize, *E_labelfontname, *E_labelfontcolor,
*E_labeldistance, *E_labelangle,
- *E_tailclip, *E_headclip;
+ *E_tailclip, *E_headclip,
+ *E_penwidth;
EXTERN fdpParms_t fdp_parms;
E_comment = agfindattr(g->proto->e, "comment");
E_tailclip = agfindattr(g->proto->e, "tailclip");
E_headclip = agfindattr(g->proto->e, "headclip");
+ E_penwidth = agfindattr(g->proto->e, "penwidth");
}
void graph_cleanup(graph_t *g)
boolean bezier_has_arrows;
void (*comment) (char *str);
void (*usershape) (usershape_t *us, boxf b, point * A, int sides, boolean filled);
+ void (*set_penwidth) (double penwidth);
};
struct codegen_info_s {
obj->rawstyle = s;
if (gvre) {
- while ((p = line = *s++)) {
+ if (s) while ((p = line = *s++)) {
if (streq(line, "solid"))
obj->pen = PEN_SOLID;
else if (streq(line, "dashed"))
}
#endif
}
+
+void gvrender_set_penwidth(GVJ_t * job, double penwidth)
+{
+ gvrender_engine_t *gvre = job->render.engine;
+
+ if (gvre) {
+ job->obj->penwidth = penwidth;
+ /*if (gvre->set_penwidth) gvre->set_penwidth(job, penwidth);*/
+ }
+#ifdef WITH_CODEGENS
+ else {
+ codegen_t *cg = job->codegen;
+
+ if (cg && cg->set_penwidth)
+ cg->set_penwidth(penwidth);
+ }
+#endif
+}