aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:31:44 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:31:44 +0200
commite99774946cf596b4527dcba92bbf17798eee9260 (patch)
tree31454d2b309cc344ac209352db0070f9356fd8ae /src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
parentector: implement a simple virtual to prepare the mask in Ector.Renderer.Gener... (diff)
downloadefl-e99774946cf596b4527dcba92bbf17798eee9260.tar.gz
ector: implementation of some common code in Ector.Renderer.Cairo.Base.
This require to make some class mixin instead of interface or abstract. So a lot of class renaming is also necessary here.
Diffstat (limited to 'src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c')
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
index e5fec89006..a219375f93 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
@@ -40,10 +40,12 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_prepare(Eo *ob
Ector_Renderer_Generic_Gradient_Data *gd;
unsigned int i;
+ eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_prepare());
+
if (pd->pat) return EINA_FALSE;
- grd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_CLASS);
- gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_CLASS);
+ grd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
+ gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);
if (!grd || !gd) return EINA_FALSE;
USE(obj, cairo_pattern_create_radial, EINA_FALSE);
@@ -75,14 +77,16 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj,
Ector_Renderer_Generic_Gradient_Radial_Data *gld;
// FIXME: don't ignore clipping !
- gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_CLASS);
+ gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
if (!pd->pat || !gld) return EINA_FALSE;
+ eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, x, y, mul_col));
+
USE(obj, cairo_arc, EINA_FALSE);
USE(obj, cairo_fill, EINA_FALSE);
cairo_arc(pd->parent->cairo,
- gld->radial.x - x, gld->radial.y - y,
+ gld->radial.x, gld->radial.y,
gld->radius,
0, 2 * M_PI);
eo_do(obj, ector_renderer_cairo_base_fill());