mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-28 21:31:36 +01:00
simplify id initialisation of last patch
reviewed by: keithp
This commit is contained in:
parent
1f515c6e6c
commit
d290a19263
2 changed files with 12 additions and 6 deletions
|
|
@ -1,5 +1,10 @@
|
|||
2005-09-30 Bertram Felgenhauer <int-e@gmx.de>
|
||||
|
||||
reviewed by: keithp
|
||||
|
||||
* src/cairo-hull.c (_cairo_hull_create): simplify id
|
||||
initialisation of last patch
|
||||
|
||||
reviewed by: cworth
|
||||
|
||||
* src/cairo-hull.c (_cairo_hull_create),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue