summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a4c8bc0)
raw | patch | inline | side by side (parent: a4c8bc0)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 May 2008 15:11:42 +0000 (15:11 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 May 2008 15:11:42 +0000 (15:11 +0000) |
src/rrd_graph.c | patch | blob | history |
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index abebde707c94040e0571518e91631dfd8e4d300c..09e0cb19893c9cc2fc0dc4bfc4e21aad33b74001 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
if (im->logarithmic) {
if (isnan(minval) || isnan(maxval) || maxval <= 0) {
- minval = 0.0; /* catching this right away below */
+ minval = 0.0; /* catching this right away below */
maxval = 5.1;
}
/* in logarithm mode, where minval is smaller or equal
}
}
- /* adjust min and max values given by the user*/
+ /* adjust min and max values given by the user */
/* for logscale we add something on top */
if (isnan(im->minval)
|| ((!im->rigid) && im->minval > minval)
case IF_PDF:
im->gridfit = 0;
im->surface = strlen(im->graphfile)
- ?
- cairo_pdf_surface_create_for_stream
- (&cairo_output, im, im->ximg * im->zoom, im->yimg * im->zoom)
- : cairo_pdf_surface_create(im->graphfile, im->ximg * im->zoom,
- im->yimg * im->zoom);
+ ? cairo_pdf_surface_create(im->graphfile, im->ximg * im->zoom,
+ im->yimg * im->zoom)
+ : cairo_pdf_surface_create_for_stream
+ (&cairo_output, im, im->ximg * im->zoom, im->yimg * im->zoom);
break;
case IF_EPS:
im->gridfit = 0;
im->surface = strlen(im->graphfile)
?
- cairo_ps_surface_create_for_stream
- (&cairo_output, im, im->ximg * im->zoom, im->yimg * im->zoom)
- : cairo_ps_surface_create(im->graphfile, im->ximg * im->zoom,
- im->yimg * im->zoom);
+ cairo_ps_surface_create(im->graphfile, im->ximg * im->zoom,
+ im->yimg * im->zoom)
+ : cairo_ps_surface_create_for_stream
+ (&cairo_output, im, im->ximg * im->zoom, im->yimg * im->zoom);
break;
case IF_SVG:
im->gridfit = 0;
im->surface = strlen(im->graphfile)
?
- cairo_svg_surface_create_for_stream
- (&cairo_output, im, im->ximg * im->zoom, im->yimg * im->zoom)
- : cairo_svg_surface_create(im->
- graphfile,
- im->
- ximg * im->zoom, im->yimg * im->zoom);
+ cairo_svg_surface_create(im->
+ graphfile,
+ im->ximg * im->zoom, im->yimg * im->zoom)
+ : cairo_svg_surface_create_for_stream
+ (&cairo_output, im, im->ximg * im->zoom, im->yimg * im->zoom);
cairo_svg_surface_restrict_to_version
(im->surface, CAIRO_SVG_VERSION_1_1);
break;
rrd_set_error("Could not save png to '%s'", im->graphfile);
return 1;
}
- }
break;
+ }
default:
if (strlen(im->graphfile)) {
cairo_show_page(im->cr);