cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=648422c60b216b99f3fdf37c7f676b1885e64ef7

commit 648422c60b216b99f3fdf37c7f676b1885e64ef7
Author: Subhransu Mohanty <sub.moha...@samsung.com>
Date:   Mon Apr 18 15:32:36 2016 -0700

    efl: add new efl_gfx_shape_append_arc() api.
    
    Reviewers: Hermet, cedric
    
    Reviewed By: cedric
    
    Subscribers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D3895
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/efl/interfaces/efl_gfx_shape.eo | 17 ++++++++++++++++-
 src/lib/evas/Evas_Legacy.h              | 16 ++++++++++++++++
 src/lib/evas/canvas/evas_vg_shape.c     |  6 ++++++
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo 
b/src/lib/efl/interfaces/efl_gfx_shape.eo
index cd5ea68..6395b98 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.eo
+++ b/src/lib/efl/interfaces/efl_gfx_shape.eo
@@ -310,7 +310,7 @@ mixin Efl.Gfx.Shape
           x-direction (rx) and radius in y direction (ry).
 
           Use this api if you know the end point's of the arc otherwise use
-          more convenient function @.append_arc_to.
+          more convenient function @.append_arc.
 
           @since 1.14
         ]]
@@ -328,6 +328,21 @@ mixin Efl.Gfx.Shape
                              property.]]
         }
       }
+      append_arc {
+        [[Append an arc that enclosed in the given rectangle (x, y, w, h).
+          The angle is defined in counter clock wise , use -ve angle for 
clockwise arc.
+
+          @since 1.18
+        ]]
+        params {
+          @in x: double; [[X co-ordinate of the rect.]]
+          @in y: double; [[Y co-ordinate of the rect.]]
+          @in w: double; [[width of the rect.]]
+          @in h: double; [[height of the rect.]]
+          @in start_angle: double; [[Angle at which the arc will start]]
+          @in sweep_length: double; [[@ Length of the arc.]]
+        }
+      }
       append_close {
         [[Closes the current subpath by drawing a line to the beginning of the
           subpath, automatically starting a new path. The current point of the
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 686739c..15b74a0 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -2239,6 +2239,22 @@ EAPI void evas_vg_shape_shape_append_scubic_to(Eo *obj, 
double x, double y, doub
 EAPI void evas_vg_shape_shape_append_arc_to(Eo *obj, double x, double y, 
double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep);
 
 /**
+ * @brief Append an arc that enclosed in the given rectangle (x, y, w, h). The
+ * angle is defined in counter clock wise , use -ve angle for clockwise arc.
+ *
+ * @param[in] y Y co-ordinate of the rect.
+ * @param[in] w width of the rect.
+ * @param[in] h height of the rect.
+ * @param[in] start_angle Angle at which the arc will start
+ * @param[in] sweep_length @ Length of the arc.
+ *
+ * @since 1.18
+ *
+ * @ingroup Efl_Gfx_Shape
+ */
+EAPI void evas_vg_shape_shape_append_arc(Eo *obj, double x, double y, double 
w, double h, double start_angle, double sweep_length);
+
+/**
  *
  * Closes the current subpath by drawing a line to the beginning of the 
subpath,
  * automatically starting a new path. The current point of the new path is
diff --git a/src/lib/evas/canvas/evas_vg_shape.c 
b/src/lib/evas/canvas/evas_vg_shape.c
index fe2c902..1123fdf 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -420,6 +420,12 @@ evas_vg_shape_shape_append_arc_to(Eo *obj, double x, 
double y, double rx, double
 }
 
 EAPI void
+evas_vg_shape_shape_append_arc(Eo *obj, double x, double y, double w, double 
h, double start_angle, double sweep_length)
+{
+   efl_gfx_shape_append_arc(obj, x, y, w, h, start_angle, sweep_length);
+}
+
+EAPI void
 evas_vg_shape_shape_append_close(Eo *obj)
 {
    efl_gfx_shape_append_close(obj);

-- 


Reply via email to