mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-10 14:00:22 +01:00
tessellator: Fixed to produce an output box with x1 <= x2 for single box input
Winding of a box is toggled by swapping x1, x2 coordinates. So we have to swap those coordinate rather than just copying. Many routines assume that boxes are left-top to right-bottom convention. So tessellator should produce such output boxes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
3b9c874489
commit
8e7589abcc
1 changed files with 7 additions and 0 deletions
|
|
@ -739,6 +739,13 @@ _cairo_bentley_ottmann_tessellate_boxes (const cairo_boxes_t *in,
|
|||
if (unlikely (in->num_boxes == 1)) {
|
||||
cairo_box_t box = in->chunks.base[0];
|
||||
_cairo_boxes_clear (out);
|
||||
|
||||
if (box.p1.x > box.p2.x) {
|
||||
cairo_fixed_t tmp = box.p1.x;
|
||||
box.p1.x = box.p2.x;
|
||||
box.p2.x = tmp;
|
||||
}
|
||||
|
||||
status = _cairo_boxes_add (out, &box);
|
||||
assert (status == CAIRO_STATUS_SUCCESS);
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue