+static bool sym_line_same_p(struct symbol *xx, struct symbol *yy)
+{
+ struct sym_line *x = (struct sym_line *) xx;
+ struct sym_line *y = (struct sym_line *) yy;
+
+ if (!(x->width == y->width &&
+ x->color == y->color &&
+ x->opacity == y->opacity &&
+ x->line_cap == y->line_cap &&
+ x->line_join == y->line_join &&
+ x->miter_limit == y->miter_limit &&
+ x->dash_offset == y->dash_offset))
+ return 0;
+
+ if (x->dash_pattern || y->dash_pattern)
+ {
+ if (!x->dash_pattern || !y->dash_pattern)
+ return 0;
+
+ if (GARY_SIZE(x->dash_pattern) != GARY_SIZE(y->dash_pattern))
+ return 0;
+
+ uint dashes = GARY_SIZE(x->dash_pattern);
+ for (uint i=0; i < dashes; i++)
+ if (x->dash_pattern[i] != y->dash_pattern[i])
+ return 0;
+ }
+
+ return 1;
+}
+