#include "output/options.h"
#include "output/page-setup-item.h"
#include "output/render.h"
-#include "output/tab.h"
#include "output/table-item.h"
#include "output/table.h"
#include "output/text-item.h"
int R = options & TAB_ROTATE ? 0 : 1;
struct xr_font *font = (options & TAB_FIX ? &xr->fonts[XR_FONT_FIXED]
- : options & TAB_EMPH ? &xr->fonts[XR_FONT_EMPHASIS]
: &xr->fonts[XR_FONT_PROPORTIONAL]);
struct xr_font local_font;
if (font_style->typeface)
struct table_item *table_item;
struct xr_rendering *r;
- table_item = table_item_create (table_from_string (TABLE_HALIGN_LEFT, text),
- NULL, NULL);
+ table_item = table_item_create (table_from_string (text), NULL, NULL);
r = xr_rendering_create (xr, &table_item->output_item, cr);
table_item_unref (table_item);
}
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 *,