summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_gradient_linear.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-20 15:24:09 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-21 14:04:59 -0500
commit7eb0375c0e0ad42f9e6be264c27cc5a04af054b7 (patch)
tree8f745c215bdb161e7f75d52ea74c6e4916491f96 /src/lib/evas/canvas/evas_vg_gradient_linear.c
parent4959286c2922376381e6d978ee28b616cc396d9d (diff)
efl_vg: namespace moves
efl.vg -> efl.canvas.vg.node efl.vg.* -> efl.canvas.vg.* ref T6714
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_gradient_linear.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_linear.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/lib/evas/canvas/evas_vg_gradient_linear.c b/src/lib/evas/canvas/evas_vg_gradient_linear.c
index 9d9046bd9d..817ed36b52 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_linear.c
@@ -5,10 +5,10 @@
5 5
6#include <strings.h> 6#include <strings.h>
7 7
8#define MY_CLASS EFL_VG_GRADIENT_LINEAR_CLASS 8#define MY_CLASS EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS
9 9
10typedef struct _Efl_VG_Gradient_Linear_Data Efl_VG_Gradient_Linear_Data; 10typedef struct _Efl_Canvas_VG_Gradient_Linear_Data Efl_Canvas_VG_Gradient_Linear_Data;
11struct _Efl_VG_Gradient_Linear_Data 11struct _Efl_Canvas_VG_Gradient_Linear_Data
12{ 12{
13 struct { 13 struct {
14 double x, y; 14 double x, y;
@@ -16,19 +16,19 @@ struct _Efl_VG_Gradient_Linear_Data
16}; 16};
17 17
18static void 18static void
19_efl_vg_gradient_linear_efl_gfx_gradient_linear_start_set(Eo *obj EINA_UNUSED, 19_efl_canvas_vg_gradient_linear_efl_gfx_gradient_linear_start_set(Eo *obj EINA_UNUSED,
20 Efl_VG_Gradient_Linear_Data *pd, 20 Efl_Canvas_VG_Gradient_Linear_Data *pd,
21 double x, double y) 21 double x, double y)
22{ 22{
23 pd->start.x = x; 23 pd->start.x = x;
24 pd->start.y = y; 24 pd->start.y = y;
25 25
26 _efl_vg_changed(obj); 26 _efl_canvas_vg_node_changed(obj);
27} 27}
28 28
29static void 29static void
30_efl_vg_gradient_linear_efl_gfx_gradient_linear_start_get(Eo *obj EINA_UNUSED, 30_efl_canvas_vg_gradient_linear_efl_gfx_gradient_linear_start_get(Eo *obj EINA_UNUSED,
31 Efl_VG_Gradient_Linear_Data *pd, 31 Efl_Canvas_VG_Gradient_Linear_Data *pd,
32 double *x, double *y) 32 double *x, double *y)
33{ 33{
34 if (x) *x = pd->start.x; 34 if (x) *x = pd->start.x;
@@ -36,19 +36,19 @@ _efl_vg_gradient_linear_efl_gfx_gradient_linear_start_get(Eo *obj EINA_UNUSED,
36} 36}
37 37
38static void 38static void
39_efl_vg_gradient_linear_efl_gfx_gradient_linear_end_set(Eo *obj EINA_UNUSED, 39_efl_canvas_vg_gradient_linear_efl_gfx_gradient_linear_end_set(Eo *obj EINA_UNUSED,
40 Efl_VG_Gradient_Linear_Data *pd, 40 Efl_Canvas_VG_Gradient_Linear_Data *pd,
41 double x, double y) 41 double x, double y)
42{ 42{
43 pd->end.x = x; 43 pd->end.x = x;
44 pd->end.y = y; 44 pd->end.y = y;
45 45
46 _efl_vg_changed(obj); 46 _efl_canvas_vg_node_changed(obj);
47} 47}
48 48
49static void 49static void
50_efl_vg_gradient_linear_efl_gfx_gradient_linear_end_get(Eo *obj EINA_UNUSED, 50_efl_canvas_vg_gradient_linear_efl_gfx_gradient_linear_end_get(Eo *obj EINA_UNUSED,
51 Efl_VG_Gradient_Linear_Data *pd, 51 Efl_Canvas_VG_Gradient_Linear_Data *pd,
52 double *x, double *y) 52 double *x, double *y)
53{ 53{
54 if (x) *x = pd->end.x; 54 if (x) *x = pd->end.x;
@@ -56,21 +56,21 @@ _efl_vg_gradient_linear_efl_gfx_gradient_linear_end_get(Eo *obj EINA_UNUSED,
56} 56}
57 57
58static void 58static void
59_efl_vg_gradient_linear_render_pre(Eo *obj, 59_efl_canvas_vg_gradient_linear_render_pre(Eo *obj,
60 Eina_Matrix3 *parent, 60 Eina_Matrix3 *parent,
61 Ector_Surface *s, 61 Ector_Surface *s,
62 void *data, 62 void *data,
63 Efl_VG_Data *nd) 63 Efl_Canvas_VG_Node_Data *nd)
64{ 64{
65 Efl_VG_Gradient_Linear_Data *pd = data; 65 Efl_Canvas_VG_Gradient_Linear_Data *pd = data;
66 Efl_VG_Gradient_Data *gd; 66 Efl_Canvas_VG_Gradient_Data *gd;
67 67
68 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return ; 68 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return ;
69 69
70 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 70 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
71 71
72 gd = efl_data_scope_get(obj, EFL_VG_GRADIENT_CLASS); 72 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS);
73 EFL_VG_COMPUTE_MATRIX(current, parent, nd); 73 EFL_CANVAS_VG_COMPUTE_MATRIX(current, parent, nd);
74 74
75 if (!nd->renderer) 75 if (!nd->renderer)
76 { 76 {
@@ -91,53 +91,53 @@ _efl_vg_gradient_linear_render_pre(Eo *obj,
91} 91}
92 92
93static Eo * 93static Eo *
94_efl_vg_gradient_linear_efl_object_constructor(Eo *obj, 94_efl_canvas_vg_gradient_linear_efl_object_constructor(Eo *obj,
95 Efl_VG_Gradient_Linear_Data *pd) 95 Efl_Canvas_VG_Gradient_Linear_Data *pd)
96{ 96{
97 Efl_VG_Data *nd; 97 Efl_Canvas_VG_Node_Data *nd;
98 98
99 obj = efl_constructor(efl_super(obj, MY_CLASS)); 99 obj = efl_constructor(efl_super(obj, MY_CLASS));
100 100
101 nd = efl_data_scope_get(obj, EFL_VG_CLASS); 101 nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
102 nd->render_pre = _efl_vg_gradient_linear_render_pre; 102 nd->render_pre = _efl_canvas_vg_gradient_linear_render_pre;
103 nd->data = pd; 103 nd->data = pd;
104 104
105 return obj; 105 return obj;
106} 106}
107 107
108static void 108static void
109_efl_vg_gradient_linear_efl_object_destructor(Eo *obj, Efl_VG_Gradient_Linear_Data *pd EINA_UNUSED) 109_efl_canvas_vg_gradient_linear_efl_object_destructor(Eo *obj, Efl_Canvas_VG_Gradient_Linear_Data *pd EINA_UNUSED)
110{ 110{
111 efl_destructor(efl_super(obj, MY_CLASS)); 111 efl_destructor(efl_super(obj, MY_CLASS));
112} 112}
113 113
114static void 114static void
115_efl_vg_gradient_linear_efl_gfx_path_bounds_get(Eo *obj, Efl_VG_Gradient_Linear_Data *pd, Eina_Rect *r) 115_efl_canvas_vg_gradient_linear_efl_gfx_path_bounds_get(Eo *obj, Efl_Canvas_VG_Gradient_Linear_Data *pd, Eina_Rect *r)
116{ 116{
117 Efl_VG_Data *nd; 117 Efl_Canvas_VG_Node_Data *nd;
118 118
119 nd = efl_data_scope_get(obj, EFL_VG_CLASS); 119 nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
120 EINA_RECTANGLE_SET(r, 120 EINA_RECTANGLE_SET(r,
121 nd->x + pd->start.x, nd->y + pd->start.y, 121 nd->x + pd->start.x, nd->y + pd->start.y,
122 pd->end.x - pd->start.x, pd->end.y - pd->start.x); 122 pd->end.x - pd->start.x, pd->end.y - pd->start.x);
123} 123}
124 124
125static Eina_Bool 125static Eina_Bool
126_efl_vg_gradient_linear_efl_gfx_path_interpolate(Eo *obj, 126_efl_canvas_vg_gradient_linear_efl_gfx_path_interpolate(Eo *obj,
127 Efl_VG_Gradient_Linear_Data *pd, 127 Efl_Canvas_VG_Gradient_Linear_Data *pd,
128 const Efl_VG *from, const Efl_VG *to, 128 const Efl_VG *from, const Efl_VG *to,
129 double pos_map) 129 double pos_map)
130{ 130{
131 Efl_VG_Gradient_Linear_Data *fromd, *tod; 131 Efl_Canvas_VG_Gradient_Linear_Data *fromd, *tod;
132 double from_map; 132 double from_map;
133 Eina_Bool r; 133 Eina_Bool r;
134 134
135 r = efl_gfx_path_interpolate(efl_super(obj, EFL_VG_GRADIENT_LINEAR_CLASS), from, to, pos_map); 135 r = efl_gfx_path_interpolate(efl_super(obj, EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS), from, to, pos_map);
136 136
137 if (!r) return EINA_FALSE; 137 if (!r) return EINA_FALSE;
138 138
139 fromd = efl_data_scope_get(from, EFL_VG_GRADIENT_LINEAR_CLASS); 139 fromd = efl_data_scope_get(from, EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS);
140 tod = efl_data_scope_get(to, EFL_VG_GRADIENT_LINEAR_CLASS); 140 tod = efl_data_scope_get(to, EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS);
141 from_map = 1.0 - pos_map; 141 from_map = 1.0 - pos_map;
142 142
143#define INTP(Pd, From, To, Member, From_Map, Pos_Map) \ 143#define INTP(Pd, From, To, Member, From_Map, Pos_Map) \
@@ -154,7 +154,7 @@ _efl_vg_gradient_linear_efl_gfx_path_interpolate(Eo *obj,
154} 154}
155 155
156EOLIAN static Efl_VG * 156EOLIAN static Efl_VG *
157_efl_vg_gradient_linear_efl_duplicate_duplicate(const Eo *obj, Efl_VG_Gradient_Linear_Data *pd) 157_efl_canvas_vg_gradient_linear_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_VG_Gradient_Linear_Data *pd)
158{ 158{
159 Efl_VG *cn = NULL; 159 Efl_VG *cn = NULL;
160 160
@@ -191,7 +191,7 @@ evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y)
191EAPI Efl_VG* 191EAPI Efl_VG*
192evas_vg_gradient_linear_add(Efl_VG *parent) 192evas_vg_gradient_linear_add(Efl_VG *parent)
193{ 193{
194 return efl_add(EFL_VG_GRADIENT_LINEAR_CLASS, parent); 194 return efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent);
195} 195}
196 196
197#include "efl_vg_gradient_linear.eo.c" 197#include "efl_canvas_vg_gradient_linear.eo.c"