X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcairo.c;h=b0915dc583bc6e529b01f6302f36ec04fa371380;hb=21687be9c3a1205a7f221d74bb88b0acbb900633;hp=975779bfa99f9555236dc292214bd553d874b283;hpb=71e127e1085ec56f4aa51153701d96a80ef8ff05;p=pspp diff --git a/src/output/cairo.c b/src/output/cairo.c index 975779bfa9..b0915dc583 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -1648,18 +1648,25 @@ xr_rendering_destroy (struct xr_rendering *r) } void -xr_rendering_measure (struct xr_rendering *r, int *w, int *h) +xr_rendering_measure (struct xr_rendering *r, int *wp, int *hp) { + int w, h; + if (is_table_item (r->item)) { - *w = render_pager_get_size (r->p, H) / XR_POINT; - *h = render_pager_get_size (r->p, V) / XR_POINT; + w = render_pager_get_size (r->p, H) / XR_POINT; + h = render_pager_get_size (r->p, V) / XR_POINT; } else { - *w = CHART_WIDTH; - *h = CHART_HEIGHT; + w = CHART_WIDTH; + h = CHART_HEIGHT; } + + if (wp) + *wp = w; + if (hp) + *hp = h; } static void xr_draw_chart (const struct chart_item *, cairo_t *,