aboutsummaryrefslogtreecommitdiffstats
path: root/rtgrpblib_draw_cubic_bezier.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtgrpblib_draw_cubic_bezier.c')
-rw-r--r--rtgrpblib_draw_cubic_bezier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rtgrpblib_draw_cubic_bezier.c b/rtgrpblib_draw_cubic_bezier.c
index c68ad88..ca5f40b 100644
--- a/rtgrpblib_draw_cubic_bezier.c
+++ b/rtgrpblib_draw_cubic_bezier.c
@@ -165,12 +165,12 @@ rtgrpblib_draw_cubic_bezier(RASTER *restrict raster, double x1, double y1, doubl
/* Remove any segments above or below the raster */
y = evaluate_cubic_bezier(t, y1, y2, y3, y4);
- if (y < 0 || y >= (double)raster->height)
+ if (y < 0 || y > (double)raster->height)
continue;
/* If the segment is inside the raster, draw it, */
x = evaluate_cubic_bezier(t, x1, x2, x3, x4);
- if (0 <= x && x < (double)raster->width) {
+ if (0 <= x && x <= (double)raster->width) {
draw_bounded_cubic_bezier(raster, x1, y1, x2, y2, x3, y3, x4, y4, t1, t2);
continue;
}