ector: gradient now uses spread while filling a shape for Cairo backend.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Subhransu Mohanty 2015-04-03 16:34:06 +02:00 committed by Cedric BAIL
parent e22752d1eb
commit 26d8641381
2 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,9 @@ static void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, doubl
double red, double green, double blue, double alpha) = NULL;
static void (*cairo_pattern_destroy)(cairo_pattern_t *pattern) = NULL;
typedef enum _cairo_extend_t{cairo_extend}cairo_extend_t;
static void (*cairo_pattern_set_extend)(cairo_pattern_t *pattern, cairo_extend_t extend) = NULL;
typedef struct _Ector_Renderer_Cairo_Gradient_Linear_Data Ector_Renderer_Cairo_Gradient_Linear_Data;
struct _Ector_Renderer_Cairo_Gradient_Linear_Data
{
@ -53,6 +56,9 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_prepare(Eo *ob
gd->colors[i].r, gd->colors[i].g,
gd->colors[i].b, gd->colors[i].a);
USE(obj, cairo_pattern_set_extend, EINA_FALSE);
cairo_pattern_set_extend(pd->pat, gd->s);
if (!pd->parent)
{
Eo *parent;

View File

@ -23,6 +23,8 @@ static void (*cairo_pattern_add_color_stop_rgba)(cairo_pattern_t *pattern, doubl
double red, double green, double blue, double alpha) = NULL;
static void (*cairo_pattern_destroy)(cairo_pattern_t *pattern) = NULL;
typedef enum _cairo_extend_t{cairo_extend}cairo_extend_t;
static void (*cairo_pattern_set_extend)(cairo_pattern_t *pattern, cairo_extend_t extend) = NULL;
// FIXME: as long as it is not possible to directly access the parent structure
// this will be duplicated from the linear gradient renderer
@ -58,6 +60,9 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_prepare(Eo *ob
gd->colors[i].r, gd->colors[i].g,
gd->colors[i].b, gd->colors[i].a);
USE(obj, cairo_pattern_set_extend, EINA_FALSE);
cairo_pattern_set_extend(pd->pat, gd->s);
if (!pd->parent)
{
Eo *parent;