mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 11:20:10 +01:00
[trap] Trivial reject if trapezoid is entirely above or below
Also check whether is vertically within limits.
This commit is contained in:
parent
911d5f1a25
commit
b9c92842d9
1 changed files with 4 additions and 0 deletions
|
|
@ -183,6 +183,10 @@ _cairo_traps_add_trap (cairo_traps_t *traps,
|
|||
return;
|
||||
}
|
||||
|
||||
/* And reject if the trapezoid is entirely above or below */
|
||||
if (top > traps->limits.p2.y || bottom < traps->limits.p1.y)
|
||||
return;
|
||||
|
||||
/* Otherwise, clip the trapezoid to the limits. We only clip
|
||||
* where an edge is entirely outside the limits. If we wanted
|
||||
* to be more clever, we could handle cases where a trapezoid
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue