diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-03-05 10:59:22 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-03-18 09:48:56 +0100 |
commit | 6521bab6e8d8c44e8a790ec6e10ae160ecaf8bc9 (patch) | |
tree | e6285460f371aef9689794791e54b5b08a236daf /src/cairo-xcb-surface-render.c | |
parent | 426fe6fadffc50f1845b114fc3f41c27f96e8e79 (diff) |
xcb,xlib: Fallback upon generic radial gradients
The RENDER specification requires radial gradients to have the first
circle completely inside the second one, but the error is not actually
generated.
The implementation produces the expected results if either circle
contains the other one, so only fall back in these cases.
Diffstat (limited to 'src/cairo-xcb-surface-render.c')
-rw-r--r-- | src/cairo-xcb-surface-render.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c index c7fcaa48..9c377e35 100644 --- a/src/cairo-xcb-surface-render.c +++ b/src/cairo-xcb-surface-render.c @@ -379,6 +379,14 @@ _pattern_is_supported (uint32_t flags, } else { /* gradient */ if ((flags & CAIRO_XCB_RENDER_HAS_GRADIENTS) == 0) return FALSE; + + /* The RENDER specification says that the inner circle has to be + * completely contained inside the outer one. */ + if (pattern->type == CAIRO_PATTERN_TYPE_RADIAL && + ! _cairo_radial_pattern_focus_is_inside ((cairo_radial_pattern_t *) pattern)) + { + return FALSE; + } } return pattern->type != CAIRO_PATTERN_TYPE_MESH; |