[gtk/wip/matthiasc/lottie-stroke: 10/16] Fix those darn Z segments
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/lottie-stroke: 10/16] Fix those darn Z segments
- Date: Wed, 2 Dec 2020 05:19:29 +0000 (UTC)
commit a4b27670f62046af8681d6383e7d7c711229716a
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 30 23:18:08 2020 -0500
Fix those darn Z segments
Make sure we initialize the re and le values
for no-draw Z segments to be the same as their
neighboring nodes.
gsk/gskpathstroke.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/gsk/gskpathstroke.c b/gsk/gskpathstroke.c
index 55968d4629..b7e924c15d 100644
--- a/gsk/gskpathstroke.c
+++ b/gsk/gskpathstroke.c
@@ -1047,20 +1047,6 @@ gsk_contour_to_stroke (const GskContour *contour,
compute_offsets (op, stroke->line_width / 2);
}
- /* Fix up a no-line close */
- if (last &&
- op->op == GSK_PATH_CLOSE &&
- graphene_point_near (&op->pts[0], &op->pts[1], 0.0001))
- {
- op1 = last->prev->data;
- op->re[0] = op->r[0] = op1->r[op1->n_pts - 1];
- op->le[0] = op->l[0] = op1->l[op1->n_pts - 1];
-
- op1 = ops->data;
- op->re[1] = op->r[1] = op1->r[0];
- op->le[1] = op->l[1] = op1->l[0];
- }
-
/* Compute intersections */
for (l = ops; l; l = l->next)
{
@@ -1074,6 +1060,11 @@ gsk_contour_to_stroke (const GskContour *contour,
if (graphene_point_near (&op1->pts[0], &op1->pts[1], 0.0001))
{
compute_intersections (op, (PathOpData *)ops->data);
+ op1->re[0] = op1->r[0] = op->re[op1->n_pts - 1];
+ op1->le[0] = op1->l[0] = op->le[op1->n_pts - 1];
+
+ op1->re[1] = op1->r[1] = ((PathOpData *)ops->data)->re[0];
+ op1->le[1] = op1->l[1] = ((PathOpData *)ops->data)->le[0];
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]