o = [];
if (attr._draw_)
o._draw_ = gt.unpackdraw (gt, attr._draw_);
+ if (attr._background)
+ o._background = gt.unpackdraw (gt, attr._background);
if (attr._ldraw_)
o._ldraw_ = gt.unpackdraw (gt, attr._ldraw_);
if (attr._hdraw_)
/*polygons */
if (plot_polyQ) {
- if (!gr) fprintf(f,"_draw_ = \"");
+ if (!gr) fprintf(f,"_background = \"");
plot_dot_polygons(&sbuff, &len, &len_max, -1., NULL, polys, x_poly, polys_groups, r, g, b, opacity);
}
fprintf(f,"%s",sbuff);
fprintf(f,"\"\n");/* close polygons/lines */
} else {
- agattr(gr, AGRAPH, "_draw_", sbuff);
+ agattr(gr, AGRAPH, "_background", sbuff);
agwrite(gr, f);
}
int cnt=0;
xdot* xDot=NULL;
xDot=parseXDotFOn (agget(e,"_draw_" ), OpFns,sizeof(sdot_op), xDot);
+ if (agobjkind(e) == AGRAPH)
+ xDot=parseXDotFOn (agget(e,"_background" ), OpFns,sizeof(sdot_op), xDot);
xDot=parseXDotFOn (agget(e,"_ldraw_" ), OpFns,sizeof(sdot_op), xDot);
xDot=parseXDotFOn (agget(e,"_hdraw_" ), OpFns,sizeof(sdot_op), xDot);
xDot=parseXDotFOn (agget(e,"_tdraw_" ), OpFns,sizeof(sdot_op), xDot);
<TR><TD><A NAME=a:URL HREF=#d:URL>URL</A>
</TD><TD>ENGC</TD><TD><A HREF=#k:escString>escString</A>
</TD><TD ALIGN="CENTER"><none></TD><TD></TD><TD>svg, postscript, map only</TD> </TR>
+ <TR><TD><A NAME=a:_background HREF=#d:_background>_background</A>
+</TD><TD>G</TD><TD>string</TD><TD ALIGN="CENTER"><none></TD><TD></TD><TD></TD> </TR>
<TR><TD><A NAME=a:area HREF=#d:area>area</A>
</TD><TD>NC</TD><TD>double</TD><TD ALIGN="CENTER">1.0</TD><TD>>0</TD><TD>patchwork only</TD> </TR>
<TR><TD><A NAME=a:arrowhead HREF=#d:arrowhead>arrowhead</A>
Also note that, if active areas of two edges overlap, it is unspecified
which area dominates.
+<DT><A NAME=d:_background HREF=#a:_background><STRONG>_background</STRONG></A>
+<DD> A string in the <A HREF=output.html#d:xdot>xdot format</A> specifying an arbitrary background.
+ During rendering, the canvas is first filled as described in the
+ <A href=#d:bgcolor>bgcolor attribute</A>.
+ Then, if <b>_background</b> is defined, the graphics
+ operations described in the string are performed on the canvas.
+
<DT><A NAME=d:area HREF=#a:area><STRONG>area</STRONG></A>
<DD> Indicates the preferred area for a node or empty cluster when laid out by patchwork.
See also the <A HREF=#d:gradientangle>gradientangle</A> attribute
for setting the gradient angle.
<P>
- If no background color is specified for the root graph, no graphics
- operation are performed on the background. This works fine for
- PostScript but for bitmap output, all bits are initialized to something.
- This means that when the bitmap output is included in some other
+ For certain output formats, such as PostScript, no fill is done for
+ the root graph unless
+ <b>bgcolor</b> is explicitly set. For bitmap formats, however,
+ the bits need to be
+ initialized to something, so the canvas is filled with white by default.
+ This means that if the bitmap output is included in some other
document, all of the bits within the bitmap's bounding box will be
- set, overwriting whatever color or graphics where already on the page.
+ set, overwriting whatever color or graphics were already on the page.
If this effect is not desired, and you only want to set bits explicitly
assigned in drawing the graph, set <B>bgcolor</B>="transparent".
# the special character '\' can cause problems. When used as a literal, use
# the HTML encoding \ to avoid problems.
#
+:_background:G:string:<none>;
+A string in the <A HREF=output.html#d:xdot>xdot format</A> specifying an arbitrary background.
+During rendering, the canvas is first filled as described in the
+<A href=#d:bgcolor>bgcolor attribute</A>.
+Then, if <b>_background</b> is defined, the graphics
+operations described in the string are performed on the canvas.
:Damping:G:double:0.99:0.0; neato
Factor damping force motions. On each iteration, a nodes movement
is limited to this factor of its potential motion. By being less than
See also the <A HREF=#d:gradientangle>gradientangle</A> attribute
for setting the gradient angle.
<P>
-If no background color is specified for the root graph, no graphics
-operation are performed on the background. This works fine for
-PostScript but for bitmap output, all bits are initialized to something.
-This means that when the bitmap output is included in some other
+For certain output formats, such as PostScript, no fill is done for
+the root graph unless
+<b>bgcolor</b> is explicitly set. For bitmap formats, however,
+the bits need to be
+initialized to something, so the canvas is filled with white by default.
+This means that if the bitmap output is included in some other
document, all of the bits within the bitmap's bounding box will be
-set, overwriting whatever color or graphics where already on the page.
+set, overwriting whatever color or graphics were already on the page.
If this effect is not desired, and you only want to set bits explicitly
assigned in drawing the graph, set <B>bgcolor</B>="transparent".
#bottomlabel:N:string:"";
char* p;
xdot* xd = NULL;
- if ((p = agget(g, "_draw_")) && p[0]) {
+ if ((p = agget(g, "_background")) && p[0]) {
#ifdef DEBUG
if (Verbose) {
start_timer();
xd = parseXDotF (p, NULL, sizeof (exdot_op));
if (!xd) {
- agerr(AGWARN, "Could not parse \"_draw_\" attribute in graph %s\n", agnameof(g));
+ agerr(AGWARN, "Could not parse \"_background\" attribute in graph %s\n", agnameof(g));
agerr(AGPREV, " \"%s\"\n", p);
}
#ifdef DEBUG