typedef struct _Ector_Renderer_Generic_Gradient_Data Ector_Renderer_Generic_Gradient_Data;
struct _Ector_Renderer_Generic_Gradient_Data
{
+ Efl_Graphics_Gradient_Stop *colors;
+ unsigned int colors_count;
+
+ Efl_Graphics_Gradient_Spread s;
};
void
const Efl_Graphics_Gradient_Stop *colors,
unsigned int length)
{
+ pd->colors = realloc(pd->colors, length * sizeof(Efl_Graphics_Gradient_Stop));
+ if (!pd->colors)
+ {
+ pd->colors_count = 0;
+ return ;
+ }
+
+ memcpy(pd->colors, colors, length * sizeof(Efl_Graphics_Gradient_Stop));
+ pd->colors_count = length;
}
void
const Efl_Graphics_Gradient_Stop **colors,
unsigned int *length)
{
+ if (colors) *colors = pd->colors;
+ if (length) *length = pd->colors_count;
}
void
Ector_Renderer_Generic_Gradient_Data *pd,
Efl_Graphics_Gradient_Spread s)
{
+ pd->s = s;
}
Efl_Graphics_Gradient_Spread
_ector_renderer_gradient_efl_graphics_gradient_spread_get(Eo *obj,
Ector_Renderer_Generic_Gradient_Data *pd)
{
+ return pd->s;
}
typedef struct _Evas_VG_Gradient_Data Evas_VG_Gradient_Data;
struct _Evas_VG_Gradient_Data
{
- // FIXME: Later on we should deduplicate it somehow.
+ // FIXME: Later on we should deduplicate it somehow (Using Ector ?).
Efl_Graphics_Gradient_Stop *colors;
unsigned int colors_count;