X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Frender.c;h=d30818a355bd8fe77150b6fc72d90d74d33aa7e8;hb=311f2cd4115da767c61c548aa25e71e722ec937c;hp=3984a44a74fea292178c19bb3b5f8f2af9b21f59;hpb=66a8687fbbe219b8c5b8d4dcd7aa2249fd55f5cf;p=pspp diff --git a/src/output/render.c b/src/output/render.c index 3984a44a74..d30818a355 100644 --- a/src/output/render.c +++ b/src/output/render.c @@ -1010,7 +1010,14 @@ render_cell (const struct render_page *page, const int ofs[TABLE_N_AXES], } } - page->params->draw_cell (page->params->aux, cell, bb, clip); + int spill[TABLE_N_AXES][2]; + for (enum table_axis axis = 0; axis < TABLE_N_AXES; axis++) + { + spill[axis][0] = rule_width (page, axis, cell->d[axis][0]) / 2; + spill[axis][1] = rule_width (page, axis, cell->d[axis][1]) / 2; + } + + page->params->draw_cell (page->params->aux, cell, bb, spill, clip); } /* Draws the cells of PAGE indicated in BB. */ @@ -1018,19 +1025,9 @@ static void render_page_draw_cells (const struct render_page *page, int ofs[TABLE_N_AXES], int bb[TABLE_N_AXES][2]) { - int x, y; - - for (y = bb[V][0]; y < bb[V][1]; y++) - for (x = bb[H][0]; x < bb[H][1]; ) - if (is_rule (x) || is_rule (y)) - { - int d[TABLE_N_AXES]; - d[H] = x; - d[V] = y; - render_rule (page, ofs, d); - x++; - } - else + for (int y = bb[V][0]; y < bb[V][1]; y++) + for (int x = bb[H][0]; x < bb[H][1]; ) + if (!is_rule (x) && !is_rule (y)) { struct table_cell cell; @@ -1040,6 +1037,18 @@ render_page_draw_cells (const struct render_page *page, x = rule_ofs (cell.d[H][1]); table_cell_free (&cell); } + else + x++; + + for (int y = bb[V][0]; y < bb[V][1]; y++) + for (int x = bb[H][0]; x < bb[H][1]; x++) + if (is_rule (x) || is_rule (y)) + { + int d[TABLE_N_AXES]; + d[H] = x; + d[V] = y; + render_rule (page, ofs, d); + } } /* Renders PAGE, by calling the 'draw_line' and 'draw_cell' functions from the