projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c6908c
)
src/output/cairo.c (xr_chart_render): New variable chart_height
author
John Darrington
<john@darrington.wattle.id.au>
Sat, 9 Sep 2017 17:46:58 +0000
(19:46 +0200)
committer
John Darrington
<john@darrington.wattle.id.au>
Sun, 10 Sep 2017 17:51:07 +0000
(19:51 +0200)
src/output/cairo.c
patch
|
blob
|
history
diff --git
a/src/output/cairo.c
b/src/output/cairo.c
index 045490992e1a9efce7eed26474e185ed4e212f01..8cb504d2dd0e877309fb916a241e69439de031bc 100644
(file)
--- a/
src/output/cairo.c
+++ b/
src/output/cairo.c
@@
-1542,13
+1542,20
@@
xr_chart_render (struct xr_render_fsm *fsm, struct xr_driver *xr)
{
struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm);
{
struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm);
- if (xr->y > 0)
+ const int chart_height = xr->length;
+
+ if (xr->y > xr->length - chart_height)
return true;
if (xr->cairo != NULL)
return true;
if (xr->cairo != NULL)
- xr_draw_chart (cs->chart_item, xr->cairo, 0.0, 0.0,
- xr_to_pt (xr->width), xr_to_pt (xr->length));
- xr->y = xr->length;
+ {
+ xr_draw_chart (cs->chart_item, xr->cairo,
+ 0.0,
+ xr_to_pt (xr->y),
+ xr_to_pt (xr->width),
+ xr_to_pt (chart_height));
+ }
+ xr->y += chart_height;
return false;
}
return false;
}