diff --git a/src/cairo-path-stroke-polygon.c b/src/cairo-path-stroke-polygon.c index e5082bb..ac85db7 100644 --- a/src/cairo-path-stroke-polygon.c +++ b/src/cairo-path-stroke-polygon.c @@ -412,8 +412,8 @@ outer_close (struct stroker *stroker, case CAIRO_LINE_JOIN_MITER: default: { /* dot product of incoming slope vector with outgoing slope vector */ - double in_dot_out = in->dev_slope.x * out->dev_slope.x + - in->dev_slope.y * out->dev_slope.y; + double in_dot_out = -in->usr_vector.x * out->usr_vector.x + + -in->usr_vector.y * out->usr_vector.y; double ml = stroker->style.miter_limit; /* Check the miter limit -- lines meeting at an acute angle @@ -473,7 +473,7 @@ outer_close (struct stroker *stroker, * 2 <= mlČ (1 - in · out) * */ - if (2 <= ml * ml * (1 + in_dot_out)) { + if (2 <= ml * ml * (1 - in_dot_out)) { double x1, y1, x2, y2; double mx, my; double dx1, dx2, dy1, dy2; @@ -596,8 +596,8 @@ outer_join (struct stroker *stroker, case CAIRO_LINE_JOIN_MITER: default: { /* dot product of incoming slope vector with outgoing slope vector */ - double in_dot_out = in->dev_slope.x * out->dev_slope.x + - in->dev_slope.y * out->dev_slope.y; + double in_dot_out = -in->usr_vector.x * out->usr_vector.x + + -in->usr_vector.y * out->usr_vector.y; double ml = stroker->style.miter_limit; /* Check the miter limit -- lines meeting at an acute angle @@ -657,7 +657,7 @@ outer_join (struct stroker *stroker, * 2 <= mlČ (1 - in · out) * */ - if (2 <= ml * ml * (1 + in_dot_out)) { + if (2 <= ml * ml * (1 - in_dot_out)) { double x1, y1, x2, y2; double mx, my; double dx1, dx2, dy1, dy2;