summaryrefslogtreecommitdiff
path: root/src/cairo-hull.c
diff options
context:
space:
mode:
authorBertram Felgenhauer <int-e@gmx.de>2005-09-29 20:00:14 +0000
committerBertram Felgenhauer <int-e@gmx.de>2005-09-29 20:00:14 +0000
commita0286781793bf2da6ba67029c8719eb614cb345a (patch)
treeb7d2ee09ef120fd824a792aaee183418ef518983 /src/cairo-hull.c
parent04170ed2854c7cb4506ddc3c64470748f1e67ffd (diff)
downloadcairo-a0286781793bf2da6ba67029c8719eb614cb345a.tar.gz
simplify id initialisation of last patch
reviewed by: keithp
Diffstat (limited to 'src/cairo-hull.c')
-rw-r--r--src/cairo-hull.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/cairo-hull.c b/src/cairo-hull.c
index ca5465b75..7fff0a0c1 100644
--- a/src/cairo-hull.c
+++ b/src/cairo-hull.c
@@ -70,14 +70,15 @@ _cairo_hull_create (cairo_pen_vertex_t *vertices, int num_vertices)
hull[i].point = vertices[i].point;
_cairo_slope_init (&hull[i].slope, &hull[0].point, &hull[i].point);
+ /* give each point a unique id for later comparison */
+ hull[i].id = i;
+
+ /* Don't discard by default */
+ hull[i].discard = 0;
+
/* Discard all points coincident with the extremal point */
- if (i != 0 && hull[i].slope.dx == 0 && hull[i].slope.dy == 0) {
+ if (i != 0 && hull[i].slope.dx == 0 && hull[i].slope.dy == 0)
hull[i].discard = 1;
- hull[i].id = -i;
- } else {
- hull[i].discard = 0;
- hull[i].id = i;
- }
}
return hull;