summaryrefslogtreecommitdiff
path: root/poly3.c
diff options
context:
space:
mode:
Diffstat (limited to 'poly3.c')
-rw-r--r--poly3.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/poly3.c b/poly3.c
index 2a341e8..ea580f2 100644
--- a/poly3.c
+++ b/poly3.c
@@ -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);