« Return to Thread: width/height return values with lazy.

Re: width/height return values with lazy.

by Raimund Berger :: Rate this Message:

Reply to Author | View in Thread

Tobias Oetiker <tobi@...> writes:

> Hi Raimund,
>
> the fix in r1439 ...
>
> this is the minimal patch ...
>
> --- src/rrd_graph.c     (revision 1438)
> +++ src/rrd_graph.c     (working copy)
> @@ -2951,8 +2951,13 @@
>      PangoFontMap *font_map = pango_cairo_font_map_get_default();
>
>      /* if we are lazy and there is nothing to PRINT ... quit now */
> -    if (lazy && im->prt_c == 0)
> +    if (lazy && im->prt_c == 0) {
> +        info.u_cnt = im->ximg;
> +        grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
> +        info.u_cnt = im->yimg;
> +        grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info);
>          return 0;
> +    }
>      /* pull the data from the rrd files ... */
>      if (data_fetch(im) == -1)
>          return -1;

Much obliged, many thanks for the helpful response, R.

_______________________________________________
rrd-users mailing list
rrd-users@...
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

 « Return to Thread: width/height return values with lazy.

LightInTheBox - Buy quality products at wholesale price!