summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_shape.c
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-04-04 13:38:34 +0200
committerCedric Bail <cedric@osg.samsung.com>2018-04-24 09:03:30 -0700
commita217d4b45576b4065f1ce0384efa9061a556f10a (patch)
treef6e65f19c6b13cb418854f358067ac2d38822880 /src/lib/evas/canvas/evas_vg_shape.c
parenta26fbbbc66f15c359fe8b27dcb034b812d735193 (diff)
Efl.Canvas.Vg.Object (from Efl.Canvas.Vg)
Also, Efl.Canvas.Vg.* (from Efl.Canvas.VG.*) Ref https://phab.enlightenment.org/T6847 Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index e150e19052..7c1ef8802d 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -5,14 +5,14 @@
5 5
6#define MY_CLASS EFL_CANVAS_VG_SHAPE_CLASS 6#define MY_CLASS EFL_CANVAS_VG_SHAPE_CLASS
7 7
8typedef struct _Efl_Canvas_VG_Shape_Data Efl_Canvas_VG_Shape_Data; 8typedef struct _Efl_Canvas_Vg_Shape_Data Efl_Canvas_Vg_Shape_Data;
9struct _Efl_Canvas_VG_Shape_Data 9struct _Efl_Canvas_Vg_Shape_Data
10{ 10{
11 Efl_Canvas_VG_Node *fill; 11 Efl_Canvas_Vg_Node *fill;
12 12
13 struct { 13 struct {
14 Efl_Canvas_VG_Node *fill; 14 Efl_Canvas_Vg_Node *fill;
15 Efl_Canvas_VG_Node *marker; 15 Efl_Canvas_Vg_Node *marker;
16 } stroke; 16 } stroke;
17}; 17};
18 18
@@ -20,10 +20,10 @@ struct _Efl_Canvas_VG_Shape_Data
20 20
21static void 21static void
22_efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED, 22_efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED,
23 Efl_Canvas_VG_Shape_Data *pd, 23 Efl_Canvas_Vg_Shape_Data *pd,
24 Efl_Canvas_VG_Node *f) 24 Efl_Canvas_Vg_Node *f)
25{ 25{
26 Efl_Canvas_VG_Node *tmp = pd->fill; 26 Efl_Canvas_Vg_Node *tmp = pd->fill;
27 27
28 pd->fill = efl_ref(f); 28 pd->fill = efl_ref(f);
29 efl_unref(tmp); 29 efl_unref(tmp);
@@ -31,18 +31,18 @@ _efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED,
31 _efl_canvas_vg_node_changed(obj); 31 _efl_canvas_vg_node_changed(obj);
32} 32}
33 33
34static Efl_Canvas_VG_Node * 34static Efl_Canvas_Vg_Node *
35_efl_canvas_vg_shape_fill_get(const Eo *obj EINA_UNUSED, Efl_Canvas_VG_Shape_Data *pd) 35_efl_canvas_vg_shape_fill_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Shape_Data *pd)
36{ 36{
37 return pd->fill; 37 return pd->fill;
38} 38}
39 39
40static void 40static void
41_efl_canvas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED, 41_efl_canvas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED,
42 Efl_Canvas_VG_Shape_Data *pd, 42 Efl_Canvas_Vg_Shape_Data *pd,
43 Efl_Canvas_VG_Node *f) 43 Efl_Canvas_Vg_Node *f)
44{ 44{
45 Efl_Canvas_VG_Node *tmp = pd->fill; 45 Efl_Canvas_Vg_Node *tmp = pd->fill;
46 46
47 pd->stroke.fill = efl_ref(f); 47 pd->stroke.fill = efl_ref(f);
48 efl_unref(tmp); 48 efl_unref(tmp);
@@ -50,19 +50,19 @@ _efl_canvas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED,
50 _efl_canvas_vg_node_changed(obj); 50 _efl_canvas_vg_node_changed(obj);
51} 51}
52 52
53static Efl_Canvas_VG_Node * 53static Efl_Canvas_Vg_Node *
54_efl_canvas_vg_shape_stroke_fill_get(const Eo *obj EINA_UNUSED, 54_efl_canvas_vg_shape_stroke_fill_get(const Eo *obj EINA_UNUSED,
55 Efl_Canvas_VG_Shape_Data *pd) 55 Efl_Canvas_Vg_Shape_Data *pd)
56{ 56{
57 return pd->stroke.fill; 57 return pd->stroke.fill;
58} 58}
59 59
60static void 60static void
61_efl_canvas_vg_shape_stroke_marker_set(Eo *obj EINA_UNUSED, 61_efl_canvas_vg_shape_stroke_marker_set(Eo *obj EINA_UNUSED,
62 Efl_Canvas_VG_Shape_Data *pd, 62 Efl_Canvas_Vg_Shape_Data *pd,
63 Efl_Canvas_VG_Shape *m) 63 Efl_Canvas_Vg_Shape *m)
64{ 64{
65 Efl_Canvas_VG_Node *tmp = pd->stroke.marker; 65 Efl_Canvas_Vg_Node *tmp = pd->stroke.marker;
66 66
67 pd->stroke.marker = efl_ref(m); 67 pd->stroke.marker = efl_ref(m);
68 efl_unref(tmp); 68 efl_unref(tmp);
@@ -70,9 +70,9 @@ _efl_canvas_vg_shape_stroke_marker_set(Eo *obj EINA_UNUSED,
70 _efl_canvas_vg_node_changed(obj); 70 _efl_canvas_vg_node_changed(obj);
71} 71}
72 72
73static Efl_Canvas_VG_Shape * 73static Efl_Canvas_Vg_Shape *
74_efl_canvas_vg_shape_stroke_marker_get(const Eo *obj EINA_UNUSED, 74_efl_canvas_vg_shape_stroke_marker_get(const Eo *obj EINA_UNUSED,
75 Efl_Canvas_VG_Shape_Data *pd) 75 Efl_Canvas_Vg_Shape_Data *pd)
76{ 76{
77 return pd->stroke.marker; 77 return pd->stroke.marker;
78} 78}
@@ -82,10 +82,10 @@ _efl_canvas_vg_shape_render_pre(Eo *obj EINA_UNUSED,
82 Eina_Matrix3 *parent, 82 Eina_Matrix3 *parent,
83 Ector_Surface *s, 83 Ector_Surface *s,
84 void *data, 84 void *data,
85 Efl_Canvas_VG_Node_Data *nd) 85 Efl_Canvas_Vg_Node_Data *nd)
86{ 86{
87 Efl_Canvas_VG_Shape_Data *pd = data; 87 Efl_Canvas_Vg_Shape_Data *pd = data;
88 Efl_Canvas_VG_Node_Data *fill, *stroke_fill, *stroke_marker, *mask; 88 Efl_Canvas_Vg_Node_Data *fill, *stroke_fill, *stroke_marker, *mask;
89 89
90 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return ; 90 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return ;
91 91
@@ -118,9 +118,9 @@ _efl_canvas_vg_shape_render_pre(Eo *obj EINA_UNUSED,
118} 118}
119 119
120static Eo * 120static Eo *
121_efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_VG_Shape_Data *pd) 121_efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *pd)
122{ 122{
123 Efl_Canvas_VG_Node_Data *nd; 123 Efl_Canvas_Vg_Node_Data *nd;
124 124
125 obj = efl_constructor(efl_super(obj, MY_CLASS)); 125 obj = efl_constructor(efl_super(obj, MY_CLASS));
126 126
@@ -137,7 +137,7 @@ _efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_VG_Shape_Data *p
137} 137}
138 138
139static void 139static void
140_efl_canvas_vg_shape_efl_object_destructor(Eo *obj, Efl_Canvas_VG_Shape_Data *pd EINA_UNUSED) 140_efl_canvas_vg_shape_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *pd EINA_UNUSED)
141{ 141{
142 efl_gfx_path_reset(obj); 142 efl_gfx_path_reset(obj);
143 efl_destructor(efl_super(obj, MY_CLASS)); 143 efl_destructor(efl_super(obj, MY_CLASS));
@@ -145,11 +145,11 @@ _efl_canvas_vg_shape_efl_object_destructor(Eo *obj, Efl_Canvas_VG_Shape_Data *pd
145 145
146static Eina_Bool 146static Eina_Bool
147_efl_canvas_vg_shape_efl_gfx_path_interpolate(Eo *obj, 147_efl_canvas_vg_shape_efl_gfx_path_interpolate(Eo *obj,
148 Efl_Canvas_VG_Shape_Data *pd, 148 Efl_Canvas_Vg_Shape_Data *pd,
149 const Efl_Canvas_VG_Node *from, const Efl_Canvas_VG_Node *to, 149 const Efl_Canvas_Vg_Node *from, const Efl_Canvas_Vg_Node *to,
150 double pos_map) 150 double pos_map)
151{ 151{
152 Efl_Canvas_VG_Shape_Data *fromd, *tod; 152 Efl_Canvas_Vg_Shape_Data *fromd, *tod;
153 Eina_Bool r; 153 Eina_Bool r;
154 154
155 fromd = efl_data_scope_get(from, EFL_CANVAS_VG_SHAPE_CLASS); 155 fromd = efl_data_scope_get(from, EFL_CANVAS_VG_SHAPE_CLASS);
@@ -174,11 +174,11 @@ _efl_canvas_vg_shape_efl_gfx_path_interpolate(Eo *obj,
174} 174}
175 175
176 176
177EOLIAN static Efl_Canvas_VG_Node * 177EOLIAN static Efl_Canvas_Vg_Node *
178_efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_VG_Shape_Data *pd) 178_efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_Data *pd)
179{ 179{
180 Efl_Canvas_VG_Node *cn = NULL; 180 Efl_Canvas_Vg_Node *cn = NULL;
181 Efl_Canvas_VG_Shape_Data *cd = NULL; 181 Efl_Canvas_Vg_Shape_Data *cd = NULL;
182 182
183 cn = efl_duplicate(efl_super(obj, MY_CLASS)); 183 cn = efl_duplicate(efl_super(obj, MY_CLASS));
184 cd = efl_data_scope_get(cn, MY_CLASS); 184 cd = efl_data_scope_get(cn, MY_CLASS);
@@ -403,8 +403,8 @@ evas_vg_shape_equal_commands(Eo *obj, const Eo *with)
403 return efl_gfx_path_equal_commands(obj, with); 403 return efl_gfx_path_equal_commands(obj, with);
404} 404}
405 405
406EAPI Efl_Canvas_VG_Node* 406EAPI Efl_Canvas_Vg_Node*
407evas_vg_shape_add(Efl_Canvas_VG_Node *parent) 407evas_vg_shape_add(Efl_Canvas_Vg_Node *parent)
408{ 408{
409 return efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); 409 return efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent);
410} 410}