From 30b14f2adca8f83ab6e91a9762b5ad3e29764c8e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 15 Dec 2020 19:05:38 -0500 Subject: [PATCH] xxx: Fix gsk_stroke_equal We need to compare all the fields, of course. --- gsk/gskstroke.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gsk/gskstroke.c b/gsk/gskstroke.c index b9d5ab1cfa..514d58c279 100644 --- a/gsk/gskstroke.c +++ b/gsk/gskstroke.c @@ -193,7 +193,25 @@ gsk_stroke_equal (gconstpointer stroke1, const GskStroke *self1 = stroke1; const GskStroke *self2 = stroke2; - return self1->line_width == self2->line_width; + if (self1->line_width != self2->line_width || + self1->line_cap != self2->line_cap || + self1->line_join != self2->line_join || + self1->miter_limit != self2->miter_limit) + return FALSE; + + if (self1->n_dash != self2->n_dash) + return FALSE; + + for (int i = 0; i < self1->n_dash; i++) + { + if (self1->dash[i] != self2->dash[i]) + return FALSE; + } + + if (self1->dash_offset != self2->dash_offset) + return FALSE; + + return TRUE; } /**