Skip to content

Commit

Permalink
minor beautufication of a corner case of fm::Outline
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Sep 23, 2024
1 parent e0127df commit e4aa701
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions img/region.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,10 @@ superimpose_outline( PRegionRec region, Point *pts, int count)
if (!( region = union_hline( region, scanline2box, a.x, a.y, b.x - a.x + 1)))
goto EXIT;
} else {
DEBUG("vertex %d.%d\n", a.x,a.y);
if (!( region = union_hline( region, scanline2box, a.x, a.y, 1)))
int n = (abs(a.x-b.x)+1) / (abs(a.y-b.y)+1);
if ( n < 1 ) n = 1;
DEBUG("vertex %d.%d %d\n", a.x,a.y, n);
if (!( region = union_hline( region, scanline2box, a.x, a.y, n)))
goto EXIT;
}
}
Expand Down

0 comments on commit e4aa701

Please sign in to comment.