stroke: Fix misuse of half_line_x for vertical caps on dashes

A typo using half_line_x instead of half_line_y when emitting dashed
segments of the rectilinear stroke.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-04-08 11:28:59 +01:00
parent 8657ca10e3
commit 6f28f0b33c

View file

@ -342,15 +342,15 @@ _cairo_rectilinear_stroker_emit_segments_dashed (cairo_rectilinear_stroker_t *st
box.p1.x = box.p2.x - half_line_x;
}
if (out_slope.dy >= 0)
box.p1.y -= half_line_x;
box.p1.y -= half_line_y;
if (out_slope.dy <= 0)
box.p2.y += half_line_x;
box.p2.y += half_line_y;
} else {
if (box.p1.y <= box.p2.y) {
box.p1.y = box.p2.y;
box.p2.y += half_line_x;
box.p2.y += half_line_y;
} else {
box.p1.y = box.p2.y - half_line_x;
box.p1.y = box.p2.y - half_line_y;
}
if (out_slope.dx >= 0)
box.p1.x -= half_line_x;