bb[H][0] = ofs[H] + page->cp[H][d[H]];
bb[H][1] = ofs[H] + page->cp[H][d[H] + 1];
- if (render_direction_rtl ())
+ if (page->params->rtl)
{
int temp = bb[H][0];
bb[H][0] = render_page_get_size (page, H) - bb[H][1];
bb[H][0] = clip[H][0] = ofs[H] + page->cp[H][cell->d[H][0] * 2 + 1];
bb[H][1] = clip[H][1] = ofs[H] + page->cp[H][cell->d[H][1] * 2];
- if (render_direction_rtl ())
+ if (page->params->rtl)
{
int temp = bb[H][0];
bb[H][0] = clip[H][0] = render_page_get_size (page, H) - bb[H][1];
bb[V][0] = clip[V][0] = ofs[V] + page->cp[V][cell->d[V][0] * 2 + 1];
bb[V][1] = clip[V][1] = ofs[V] + page->cp[V][cell->d[V][1] * 2];
- int valign = (cell->n_contents
- ? cell->contents->options & TAB_VALIGN
- : TAB_TOP);
+ int valign = cell->options & TAB_VALIGN;
if (valign != TAB_TOP)
{
int height = page->params->measure_cell_height (
spill[axis][1] = rule_width (page, axis, cell->d[axis][1]) / 2;
}
- page->params->draw_cell (page->params->aux, cell, bb, spill, clip);
+ int color_idx = (cell->d[V][0] < page->h[V][0]
+ || page->n[V] - (cell->d[V][0] + 1) < page->h[V][1]
+ ? 0
+ : (cell->d[V][0] - page->h[V][0]) & 1);
+ page->params->draw_cell (page->params->aux, cell, color_idx,
+ bb, spill, clip);
}
/* Draws the cells of PAGE indicated in BB. */
/* Title. */
add_text_page (p, table_item_get_title (table_item), title_width);
+ /* Layers. */
+ add_text_page (p, table_item_get_layers (table_item), title_width);
+
/* Body. */
render_pager_add_table (p, table_ref (table_item_get_table (table_item)), 0);