mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 00:08:06 +02:00
pattern: Zero-length gradients are not necessary empty
Fixes: test/linear-step-function If the extend mode is unbounded, then the gradient is also unbound.
This commit is contained in:
parent
2a59220aa4
commit
1ecefc53a1
1 changed files with 3 additions and 3 deletions
|
|
@ -2526,12 +2526,12 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern,
|
|||
const cairo_linear_pattern_t *linear =
|
||||
(const cairo_linear_pattern_t *) pattern;
|
||||
|
||||
if (linear->p1.x == linear->p2.x && linear->p1.y == linear->p2.y)
|
||||
goto EMPTY;
|
||||
|
||||
if (pattern->extend != CAIRO_EXTEND_NONE)
|
||||
goto UNBOUNDED;
|
||||
|
||||
if (linear->p1.x == linear->p2.x && linear->p1.y == linear->p2.y)
|
||||
goto EMPTY;
|
||||
|
||||
if (pattern->matrix.xy != 0. || pattern->matrix.yx != 0.)
|
||||
goto UNBOUNDED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue