mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 02:38:07 +02:00
stroke: Use the tessellator to resolve overlapping strokes
If the stroke is too large, the strokes around the box overlap and we fail to generate the canonical form of the boxes. So if we detect that the boxes overlap, feed them through the tessellator to reduce them to canonical form. Fixes line-width-overlap. Based on a patch by Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
30eac7b2c5
commit
2994b0c634
1 changed files with 4 additions and 1 deletions
|
|
@ -619,7 +619,10 @@ _cairo_path_fixed_stroke_rectilinear_to_boxes (const cairo_path_fixed_t *path,
|
|||
}
|
||||
|
||||
if (! rectilinear_stroker.dash.dashed &&
|
||||
_cairo_path_fixed_is_stroke_box (path, &box))
|
||||
_cairo_path_fixed_is_stroke_box (path, &box) &&
|
||||
/* if the segments overlap we need to feed them into the tessellator */
|
||||
box.p2.x - box.p1.x > 2* rectilinear_stroker.half_line_width &&
|
||||
box.p2.y - box.p1.y > 2* rectilinear_stroker.half_line_width)
|
||||
{
|
||||
cairo_box_t b;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue