[gtk/fix-winding] Fix gsk_contour_get_winding
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-winding] Fix gsk_contour_get_winding
- Date: Mon, 14 Dec 2020 02:48:04 +0000 (UTC)
commit 7a2d99576e854db67d65678f8821210de8732673
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 13 21:47:17 2020 -0500
Fix gsk_contour_get_winding
If a contour is not closed, its winding number is
zero, by definition.
gsk/gskcontour.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gskcontour.c b/gsk/gskcontour.c
index 59de4bb759..33bbc72695 100644
--- a/gsk/gskcontour.c
+++ b/gsk/gskcontour.c
@@ -1651,7 +1651,10 @@ gsk_contour_get_winding (const GskContour *self,
const graphene_point_t *point,
gboolean *on_edge)
{
- return self->klass->get_winding (self, measure_data, point, on_edge);
+ if (gsk_contour_get_flags (self) & GSK_PATH_CLOSED)
+ return self->klass->get_winding (self, measure_data, point, on_edge);
+
+ return 0;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]