/* PSPP - a program for statistical analysis.
- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
if (brk && clip[H][0] != clip[H][1])
best = bottom;
- *brk = bottom;
+ if (brk)
+ *brk = bottom;
}
else
break;
}
while (pango_layout_iter_next_line (iter));
+ pango_layout_iter_free (iter);
/* If enabled, draws a green line across the chosen breakpoint, which can
be useful for debugging issues with breaking. */
return r;
}
-void
+void
xr_rendering_apply_options (struct xr_rendering *xr, struct string_map *o)
{
if (is_table_item (xr->item))
{
struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm);
- if (xr->y > 0)
+ const int chart_height = 0.8 * (xr->length < xr->width ? xr->length : xr->width);
+
+ if (xr->y > xr->length - chart_height)
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;
}