summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_gradient_linear.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_gradient_linear.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_linear.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/lib/evas/canvas/evas_vg_gradient_linear.c b/src/lib/evas/canvas/evas_vg_gradient_linear.c
index 7234d4b..471556f 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_linear.c
@@ -73,19 +73,18 @@ _efl_vg_gradient_linear_render_pre(Eo *obj,
73 73
74 if (!nd->renderer) 74 if (!nd->renderer)
75 { 75 {
76 eo_do(s, nd->renderer = ector_surface_renderer_factory_new(ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)); 76 nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN);
77 } 77 }
78 78
79 eo_do(nd->renderer, 79 ector_renderer_transformation_set(nd->renderer, current);
80 ector_renderer_transformation_set(current), 80 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
81 ector_renderer_origin_set(nd->x, nd->y), 81 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a);
82 ector_renderer_color_set(nd->r, nd->g, nd->b, nd->a), 82 ector_renderer_visibility_set(nd->renderer, nd->visibility);
83 ector_renderer_visibility_set(nd->visibility), 83 efl_gfx_gradient_stop_set(nd->renderer, gd->colors, gd->colors_count);
84 efl_gfx_gradient_stop_set(gd->colors, gd->colors_count), 84 efl_gfx_gradient_spread_set(nd->renderer, gd->s);
85 efl_gfx_gradient_spread_set(gd->s), 85 efl_gfx_gradient_linear_start_set(nd->renderer, pd->start.x, pd->start.y);
86 efl_gfx_gradient_linear_start_set(pd->start.x, pd->start.y), 86 efl_gfx_gradient_linear_end_set(nd->renderer, pd->end.x, pd->end.y);
87 efl_gfx_gradient_linear_end_set(pd->end.x, pd->end.y), 87 ector_renderer_prepare(nd->renderer);
88 ector_renderer_prepare());
89} 88}
90 89
91static Eo * 90static Eo *
@@ -94,7 +93,7 @@ _efl_vg_gradient_linear_eo_base_constructor(Eo *obj,
94{ 93{
95 Efl_VG_Base_Data *nd; 94 Efl_VG_Base_Data *nd;
96 95
97 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 96 obj = eo_constructor(eo_super(obj, MY_CLASS));
98 97
99 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS); 98 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
100 nd->render_pre = _efl_vg_gradient_linear_render_pre; 99 nd->render_pre = _efl_vg_gradient_linear_render_pre;
@@ -106,7 +105,7 @@ _efl_vg_gradient_linear_eo_base_constructor(Eo *obj,
106static void 105static void
107_efl_vg_gradient_linear_eo_base_destructor(Eo *obj, Efl_VG_Gradient_Linear_Data *pd EINA_UNUSED) 106_efl_vg_gradient_linear_eo_base_destructor(Eo *obj, Efl_VG_Gradient_Linear_Data *pd EINA_UNUSED)
108{ 107{
109 eo_do_super(obj, MY_CLASS, eo_destructor()); 108 eo_destructor(eo_super(obj, MY_CLASS));
110} 109}
111 110
112static void 111static void
@@ -130,7 +129,7 @@ _efl_vg_gradient_linear_efl_vg_base_interpolate(Eo *obj,
130 double from_map; 129 double from_map;
131 Eina_Bool r; 130 Eina_Bool r;
132 131
133 eo_do_super(obj, EFL_VG_GRADIENT_LINEAR_CLASS, r = efl_vg_interpolate(from, to, pos_map)); 132 r = efl_vg_interpolate(eo_super(obj, EFL_VG_GRADIENT_LINEAR_CLASS), from, to, pos_map);
134 133
135 if (!r) return EINA_FALSE; 134 if (!r) return EINA_FALSE;
136 135
@@ -158,37 +157,36 @@ _efl_vg_gradient_linear_efl_vg_base_dup(Eo *obj,
158{ 157{
159 Efl_VG_Gradient_Linear_Data *fromd; 158 Efl_VG_Gradient_Linear_Data *fromd;
160 159
161 eo_do_super(obj, EFL_VG_GRADIENT_LINEAR_CLASS, efl_vg_dup(from)); 160 efl_vg_dup(eo_super(obj, EFL_VG_GRADIENT_LINEAR_CLASS), from);
162 161
163 fromd = eo_data_scope_get(from, EFL_VG_GRADIENT_LINEAR_CLASS); 162 fromd = eo_data_scope_get(from, EFL_VG_GRADIENT_LINEAR_CLASS);
164 163
165 eo_do(obj, 164 efl_gfx_gradient_linear_start_set(obj, fromd->start.x, fromd->start.y);
166 efl_gfx_gradient_linear_start_set(fromd->start.x, fromd->start.y), 165 efl_gfx_gradient_linear_end_set(obj, fromd->end.x, fromd->end.y);
167 efl_gfx_gradient_linear_end_set(fromd->end.x, fromd->end.y));
168} 166}
169 167
170EAPI void 168EAPI void
171evas_vg_gradient_linear_start_set(Eo *obj, double x, double y) 169evas_vg_gradient_linear_start_set(Eo *obj, double x, double y)
172{ 170{
173 eo_do(obj, efl_gfx_gradient_linear_start_set(x, y)); 171 efl_gfx_gradient_linear_start_set(obj, x, y);
174} 172}
175 173
176EAPI void 174EAPI void
177evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y) 175evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y)
178{ 176{
179 eo_do(obj, efl_gfx_gradient_linear_start_get(x, y)); 177 efl_gfx_gradient_linear_start_get(obj, x, y);
180} 178}
181 179
182EAPI void 180EAPI void
183evas_vg_gradient_linear_end_set(Eo *obj, double x, double y) 181evas_vg_gradient_linear_end_set(Eo *obj, double x, double y)
184{ 182{
185 eo_do(obj, efl_gfx_gradient_linear_end_set(x, y)); 183 efl_gfx_gradient_linear_end_set(obj, x, y);
186} 184}
187 185
188EAPI void 186EAPI void
189evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y) 187evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y)
190{ 188{
191 eo_do(obj, efl_gfx_gradient_linear_end_get(x, y)); 189 efl_gfx_gradient_linear_end_get(obj, x, y);
192} 190}
193 191
194#include "efl_vg_gradient_linear.eo.c" 192#include "efl_vg_gradient_linear.eo.c"