*xr->page_style = (struct xr_page_style) {
.ref_cnt = 1,
- .size = { [H] = size[H], [V] = size[V] },
.margins = {
[H] = { margins[H][0], margins[H][1], },
[V] = { margins[V][0], margins[V][1], },
},
- .font = pango_font_description_copy (proportional_font),
-
.bg = bg,
- .font_scale = font_scale,
.initial_page_number = 1,
.object_spacing = object_spacing,
};
double paper[TABLE_N_AXES];
for (int a = 0; a < TABLE_N_AXES; a++)
- paper[a] = xr_to_pt (xr_page_style_paper_size (xr->page_style, a));
+ paper[a] = xr_to_pt (xr_page_style_paper_size (xr->page_style,
+ xr->fsm_style, a));
if (file_type == XR_PDF)
xr->surface = cairo_pdf_surface_create (file_name, paper[H], paper[V]);
else if (file_type == XR_PS)
*page_style = (struct xr_page_style) {
.ref_cnt = 1,
- .size = {
- [H] = (ps->paper[h] - ps->margins[h][0] - ps->margins[h][1]) * scale,
- [V] = (ps->paper[v] - ps->margins[v][0] - ps->margins[v][1]) * scale,
- },
.margins = {
[H] = { ps->margins[h][0] * scale, ps->margins[h][1] * scale },
[V] = { ps->margins[v][0] * scale, ps->margins[v][1] * scale },
},
- .font = pango_font_description_copy (xr->page_style->font),
-
.bg = xr->page_style->bg,
- .font_scale = xr->page_style->font_scale,
.initial_page_number = ps->initial_page_number,
.object_spacing = ps->object_spacing * 72 * XR_POINT,
};
if (!xr->pager)
{
- xr->pager = xr_pager_create (xr->page_style);
+ xr->pager = xr_pager_create (xr->page_style, xr->fsm_style);
xr_pager_add_page (xr->pager, cairo_create (xr->surface));
}
- xr_pager_add_item (xr->pager, xr->fsm_style, output_item);
+ xr_pager_add_item (xr->pager, output_item);
while (xr_pager_needs_new_page (xr->pager))
{
cairo_surface_show_page (xr->surface);