diff options
author | Søren Sandmann Pedersen <ssp@l3000.localdomain> | 2010-12-21 11:46:13 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@l3000.localdomain> | 2010-12-21 11:46:13 -0500 |
commit | 828dad7f8021cc63d6207c2cfc6a781d670ea1c9 (patch) | |
tree | 5608c019be01a47bdf9dada281f27598098ffe62 | |
parent | d2d3d7dd08f4816dc4c77e756d45d47d539faca3 (diff) |
steps
-rw-r--r-- | poly3.c | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -272,6 +272,18 @@ edge_init (edge_t *edge, sample_t first_yi) } static void +edge_small_step (edge_t *edge) +{ + long_edge_small_step (&edge->long_); +} + +static void +edge_big_step (edge_t *edge) +{ + long_edge_big_step (&edge->long_); +} + +static void get_points (const seg_t *seg, const point_t **top, const point_t **bottom) { const point_t *t, *b; @@ -415,18 +427,19 @@ polygon_rasterize (polygon_t *polygon, int x, int y, int width, int height) { int i, j; + active = update_active (active, yi); + for (i = 0; i < N_GRID_Y - 1; ++i) { - active = update_active (active, yi); - for (j = 0; j < active->n_edges; ++j) { /* emit yi, edge->xi */ - long_edge_small_step (&active->edges[j]->long_); + edge_small_step (active->edges[j]); } yi++; + active = update_active (active, yi); } active = update_active (active, yi); @@ -435,7 +448,7 @@ polygon_rasterize (polygon_t *polygon, int x, int y, int width, int height) { /* emit ((yi | (N_GRID_Y - 1), edge->xi), */ - long_edge_big_step (&active->edges[j]->long_); + edge_big_step (active->edges[j]); } yi = fixed_floor (yi + fixed_1); |