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:
Chris Wilson 2010-02-02 16:26:54 +00:00
parent 2a59220aa4
commit 1ecefc53a1

View file

@ -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;