projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
71e127e
)
cairo: Make xr_rendering_measure() tolerate NULL arguments.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 2 Jan 2019 06:07:47 +0000
(22:07 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 2 Jan 2019 06:07:55 +0000
(22:07 -0800)
src/output/cairo.c
patch
|
blob
|
history
diff --git
a/src/output/cairo.c
b/src/output/cairo.c
index 975779bfa99f9555236dc292214bd553d874b283..b0915dc583bc6e529b01f6302f36ec04fa371380 100644
(file)
--- a/
src/output/cairo.c
+++ b/
src/output/cairo.c
@@
-1648,18
+1648,25
@@
xr_rendering_destroy (struct xr_rendering *r)
}
void
}
void
-xr_rendering_measure (struct xr_rendering *r, int *w
, int *h
)
+xr_rendering_measure (struct xr_rendering *r, int *w
p, int *hp
)
{
{
+ int w, h;
+
if (is_table_item (r->item))
{
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
{
}
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 *,
}
static void xr_draw_chart (const struct chart_item *, cairo_t *,