- Accuracy of the bounding boxes printed by the `showboxes` feature have been
improved.
+### Fixed
+
+- Id attribute is not used in linearGradient. #2258
+
### Removed
- The `$GV_FILE_PATH` sandboxing mechanism has been removed #2257
G[0].x = G[0].y = G[1].x = G[1].y = 0.;
get_gradient_points(A, G, n, angle, 0); //get points on gradient line
- gvprintf(job,
- "<defs>\n<linearGradient id=\"l_%d\" gradientUnits=\"userSpaceOnUse\" ", id);
+ gvputs(job, "<defs>\n<linearGradient id=\"");
+ if (obj->id != NULL) {
+ gvputs_xml(job, obj->id);
+ gvputc(job, '_');
+ }
+ gvprintf(job, "l_%d\" gradientUnits=\"userSpaceOnUse\" ", id);
gvputs(job, "x1=\"");
gvprintdouble(job, G[0].x);
gvputs(job, "\" y1=\"");
ifx = round(50 * (1 + cos(angle)));
ify = round(50 * (1 - sin(angle)));
}
- gvprintf(job,
- "<defs>\n<radialGradient id=\"r_%d\" cx=\"50%%\" cy=\"50%%\" r=\"75%%\" "
+ gvputs(job, "<defs>\n<radialGradient id=\"");
+ if (obj->id != NULL) {
+ gvputs_xml(job, obj->id);
+ gvputc(job, '_');
+ }
+ gvprintf(job, "r_%d\" cx=\"50%%\" cy=\"50%%\" r=\"75%%\" "
"fx=\"%.0f%%\" fy=\"%.0f%%\">\n",
id, ifx, ify);
with pytest.raises(subprocess.CalledProcessError):
subprocess.check_call(["dot", "-Tsvg", input, "-o", os.devnull], env=env)
-@pytest.mark.xfail(strict=True)
def test_2258():
"""
'id' attribute should be propagated to all graph children in output