mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 22:48:07 +02:00
tor: Fudge the edge if it is projected into a point
If we generate an edge (through polygon-intersect) where its end-points lie outside the line definition then it is possible for that line to be degenerate under sample grid projection. Apply a fudge factor to prevent explosions as otherwise we reject an edge whose height is not strictly 0. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54822 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
cabb3c3bdf
commit
797441093a
2 changed files with 2 additions and 2 deletions
|
|
@ -1506,7 +1506,7 @@ glitter_scan_converter_add_edge (glitter_scan_converter_t *converter,
|
|||
INPUT_TO_GRID_Y (edge->line.p1.y, e.line.p1.y);
|
||||
INPUT_TO_GRID_Y (edge->line.p2.y, e.line.p2.y);
|
||||
if (e.line.p1.y == e.line.p2.y)
|
||||
return;
|
||||
e.line.p2.y++; /* little fudge to prevent a div-by-zero */
|
||||
|
||||
INPUT_TO_GRID_X (edge->line.p1.x, e.line.p1.x);
|
||||
INPUT_TO_GRID_X (edge->line.p2.x, e.line.p2.x);
|
||||
|
|
|
|||
|
|
@ -1362,7 +1362,7 @@ glitter_scan_converter_add_edge (glitter_scan_converter_t *converter,
|
|||
INPUT_TO_GRID_Y (edge->line.p1.y, e.line.p1.y);
|
||||
INPUT_TO_GRID_Y (edge->line.p2.y, e.line.p2.y);
|
||||
if (e.line.p1.y == e.line.p2.y)
|
||||
return;
|
||||
e.line.p2.y++; /* Fudge to prevent div-by-zero */
|
||||
|
||||
INPUT_TO_GRID_X (edge->line.p1.x, e.line.p1.x);
|
||||
INPUT_TO_GRID_X (edge->line.p2.x, e.line.p2.x);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue