summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_shape.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:23:28 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:23:28 +0200
commitac8d923090f69a7cfe6397dd47df701aad421294 (patch)
tree36d94d397b15748a4a55ec1dda4c247b20974335 /src/lib/evas/canvas/evas_vg_shape.c
parent1fb52dbe714e0a39578c2fe111e2142ee632841e (diff)
efl: add path operation to Efl.Gfx.Shape.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_shape.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index 504a34a..c6cee02 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -8,9 +8,6 @@
8typedef struct _Evas_VG_Shape_Data Evas_VG_Shape_Data; 8typedef struct _Evas_VG_Shape_Data Evas_VG_Shape_Data;
9struct _Evas_VG_Shape_Data 9struct _Evas_VG_Shape_Data
10{ 10{
11 Efl_Gfx_Path_Command *ops;
12 double *points;
13
14 Evas_VG_Node *fill; 11 Evas_VG_Node *fill;
15 12
16 struct { 13 struct {
@@ -31,30 +28,6 @@ struct _Evas_VG_Shape_Data
31 } stroke; 28 } stroke;
32}; 29};
33 30
34static void
35_evas_vg_shape_efl_gfx_shape_path_set(Eo *obj EINA_UNUSED,
36 Evas_VG_Shape_Data *pd,
37 const Efl_Gfx_Path_Command *ops,
38 const double *points)
39{
40 free(pd->points);
41 pd->points = NULL;
42 free(pd->ops);
43 pd->ops = NULL;
44
45 efl_gfx_path_dup(&pd->ops, &pd->points, ops, points);
46}
47
48static void
49_evas_vg_shape_efl_gfx_shape_path_get(Eo *obj EINA_UNUSED,
50 Evas_VG_Shape_Data *pd,
51 const Efl_Gfx_Path_Command **op,
52 const double **points)
53{
54 if (op) *op = pd->ops;
55 if (points) *points = pd->points;
56}
57
58static Eina_Bool 31static Eina_Bool
59_evas_vg_shape_evas_vg_node_bound_get(Eo *obj, 32_evas_vg_shape_evas_vg_node_bound_get(Eo *obj,
60 Evas_VG_Shape_Data *pd, 33 Evas_VG_Shape_Data *pd,
@@ -270,17 +243,7 @@ _evas_vg_shape_render_pre(Eo *obj EINA_UNUSED,
270 ector_renderer_shape_fill_set(fill ? fill->renderer : NULL), 243 ector_renderer_shape_fill_set(fill ? fill->renderer : NULL),
271 ector_renderer_shape_stroke_fill_set(stroke_fill ? stroke_fill->renderer : NULL), 244 ector_renderer_shape_stroke_fill_set(stroke_fill ? stroke_fill->renderer : NULL),
272 ector_renderer_shape_stroke_marker_set(stroke_marker ? stroke_marker->renderer : NULL), 245 ector_renderer_shape_stroke_marker_set(stroke_marker ? stroke_marker->renderer : NULL),
273 efl_gfx_shape_stroke_scale_set(pd->stroke.scale), 246 efl_gfx_shape_dup(obj),
274 efl_gfx_shape_stroke_color_set(pd->stroke.r,
275 pd->stroke.g,
276 pd->stroke.b,
277 pd->stroke.a),
278 efl_gfx_shape_stroke_width_set(pd->stroke.width),
279 efl_gfx_shape_stroke_location_set(pd->stroke.centered),
280 efl_gfx_shape_stroke_dash_set(pd->stroke.dash, pd->stroke.dash_count),
281 efl_gfx_shape_stroke_cap_set(pd->stroke.cap),
282 efl_gfx_shape_stroke_join_set(pd->stroke.join),
283 efl_gfx_shape_path_set(pd->ops, pd->points),
284 ector_renderer_prepare()); 247 ector_renderer_prepare());
285} 248}
286 249