From b7544636d4b9328c35cf37dcbdb579446252db04 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 9 Aug 2023 15:07:58 -0400 Subject: [PATCH] contour: Skip the move When jumping between segments, we always need to skip index 0, since thats the move. This fixes the tangent checks in the rectangle tests. --- gsk/gskcontour.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsk/gskcontour.c b/gsk/gskcontour.c index d49bd8cd3c..097113c72c 100644 --- a/gsk/gskcontour.c +++ b/gsk/gskcontour.c @@ -512,7 +512,7 @@ gsk_standard_contour_get_tangent (const GskContour *contour, if (t == 0 && direction == GSK_PATH_START) { /* Look at the previous segment */ - if (idx > 0) + if (idx > 1) { idx--; t = 1; @@ -533,7 +533,7 @@ gsk_standard_contour_get_tangent (const GskContour *contour, } else if (self->flags & GSK_PATH_CLOSED) { - idx = 0; + idx = 1; t = 0; } }