1
0
mirror of https://github.com/nothings/stb synced 2025-03-14 16:21:12 -04:00
This commit is contained in:
Tommy Nguyen 2017-03-27 07:21:37 +00:00 committed by GitHub
commit 793bb8fb44

View File

@ -2554,16 +2554,17 @@ static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edg
y1 = e->ey;
}
if (x0 == x)
if (x0 == x) {
STBTT_assert(x1 <= x+1);
else if (x0 == x+1)
} else if (x0 == x+1) {
STBTT_assert(x1 >= x);
else if (x0 <= x)
} else if (x0 <= x) {
STBTT_assert(x1 <= x);
else if (x0 >= x+1)
} else if (x0 >= x+1) {
STBTT_assert(x1 >= x+1);
else
} else {
STBTT_assert(x1 >= x && x1 <= x+1);
}
if (x0 <= x && x1 <= x)
scanline[x] += e->direction * (y1-y0);