ector: duplicate PATH could be useful. 67/43167/1
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 2 Jan 2015 11:02:12 +0000 (12:02 +0100)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 8 Jul 2015 01:59:13 +0000 (10:59 +0900)
Change-Id: Ib0cf93fa2307c5805d87ead9efa64282e6c64c8c

src/lib/ector/ector_renderer_shape.c

index 449b8e5..27c60c8 100644 (file)
 typedef struct _Ector_Renderer_Generic_Shape_Data Ector_Renderer_Generic_Shape_Data;
 struct _Ector_Renderer_Generic_Shape_Data
 {
+   struct {
+      Efl_Graphics_Path_Command *cmd;
+      double *pts;
+   } path;
+
    Ector_Renderer *fill;
    struct {
       Ector_Renderer *fill;
@@ -209,11 +214,17 @@ _ector_renderer_shape_efl_graphics_shape_stroke_join_get(Eo *obj EINA_UNUSED,
 }
 
 Eina_Bool
-_ector_renderer_shape_efl_graphics_shape_path_set(Eo *obj,
+_ector_renderer_shape_efl_graphics_shape_path_set(Eo *obj EINA_UNUSED,
                                                   Ector_Renderer_Generic_Shape_Data *pd,
-                                                  const Efl_Graphics_Path_Command *op,
+                                                  const Efl_Graphics_Path_Command *cmd,
                                                   const double *points)
 {
+   free(pd->path.cmd);
+   pd->path.cmd = NULL;
+   free(pd->path.pts);
+   pd->path.pts = NULL;
+
+   return efl_graphics_path_dup(&pd->path.cmd, &pd->path.pts, cmd, points);
 }
 
 void