- struct table_item *table_item = to_table_item (output_item);
- const char *caption = table_item_get_caption (table_item);
- struct render_params params;
- struct render_page *page;
- struct render_break x_break;
- int caption_height;
- int i;
+ /* XXX doesn't do well with very large captions */
+ struct table_cell cell;
+ ascii_init_caption_cell (caption, &cell);
+ caption_height = ascii_measure_cell_height (a, &cell, a->width);
+ }
+ else
+ caption_height = 0;
+
+ params.draw_line = ascii_draw_line;
+ params.measure_cell_width = ascii_measure_cell_width;
+ params.measure_cell_height = ascii_measure_cell_height;
+ params.draw_cell = ascii_draw_cell,
+ params.aux = a;
+ params.size[H] = a->width;
+ params.size[V] = a->length - caption_height;
+ params.font_size[H] = 1;
+ params.font_size[V] = 1;
+ for (i = 0; i < RENDER_N_LINES; i++)
+ {
+ int width = i == RENDER_LINE_NONE ? 0 : 1;
+ params.line_widths[H][i] = width;
+ params.line_widths[V][i] = width;
+ }