hermet pushed a commit to branch master.

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

commit fa8f20338d462822c76b4da1969fcccc8a80f04f
Author: JunsuChoi <[email protected]>
Date:   Thu Aug 22 12:45:09 2019 +0900

    efl_gfx_shape: Add stroke_miterlimit property
    
    Summary:
    Sets limit on ratio of miter value of the stroke join.
    If a miter join exists, it must be supported.
    
    Test Plan: N/A
    
    Reviewers: Hermet, smohanty, kimcinoo
    
    Reviewed By: Hermet
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D9657
---
 src/lib/efl/interfaces/efl_gfx_shape.c   | 16 ++++++++++++++++
 src/lib/efl/interfaces/efl_gfx_shape.eo  | 12 ++++++++++++
 src/lib/efl/interfaces/efl_gfx_types.eot |  1 +
 3 files changed, 29 insertions(+)

diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c 
b/src/lib/efl/interfaces/efl_gfx_shape.c
index fa3b718e1b..7d7e177732 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -293,6 +293,7 @@ _efl_gfx_shape_efl_gfx_path_copy_from(Eo *obj, 
Efl_Gfx_Shape_Data *pd,
    pd->public.stroke.color.g = from->public.stroke.color.g;
    pd->public.stroke.color.b = from->public.stroke.color.b;
    pd->public.stroke.color.a = from->public.stroke.color.a;
+   pd->public.stroke.miterlimit = from->public.stroke.miterlimit;
    pd->fill_rule = from->fill_rule;
 
    _efl_gfx_shape_stroke_dash_set(obj, pd, from->public.stroke.dash,
@@ -301,4 +302,19 @@ _efl_gfx_shape_efl_gfx_path_copy_from(Eo *obj, 
Efl_Gfx_Shape_Data *pd,
    efl_gfx_path_copy_from(efl_super(obj, MY_CLASS), dup_from);
 }
 
+EOLIAN static void
+_efl_gfx_shape_stroke_miterlimit_set(Eo *obj EINA_UNUSED,
+                                     Efl_Gfx_Shape_Data *pd,
+                                     double miterlimit)
+{
+   pd->public.stroke.miterlimit = miterlimit;
+}
+
+EOLIAN static double
+_efl_gfx_shape_stroke_miterlimit_get(const Eo *obj EINA_UNUSED,
+                                     Efl_Gfx_Shape_Data *pd)
+{
+   return pd->public.stroke.miterlimit;
+}
+
 #include "interfaces/efl_gfx_shape.eo.c"
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo 
b/src/lib/efl/interfaces/efl_gfx_shape.eo
index 321d4057bf..89750771da 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.eo
+++ b/src/lib/efl/interfaces/efl_gfx_shape.eo
@@ -97,6 +97,18 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path
             j: Efl.Gfx.Join; [[Join style to use, default is 
@Efl.Gfx.Join.miter]]
          }
       }
+      @property stroke_miterlimit {
+         [[The stroke_miterlimit is a presentation defining a limit on the 
ratio of
+           the miter length to the stroke-width used to draw a miter join.
+         ]]
+         set {
+         }
+         get {
+         }
+         values {
+            miterlimit: double; [[Limit value on the ratio of the miter.]]
+         }
+      }
       @property fill_rule {
          [[The fill rule of the given shape object.
            @Efl.Gfx.Fill_Rule.winding or @Efl.Gfx.Fill_Rule.odd_even.
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot 
b/src/lib/efl/interfaces/efl_gfx_types.eot
index 64bde5a6c7..0f2954b954 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -132,6 +132,7 @@ struct @beta Efl.Gfx.Stroke
   dash_length: uint; [[Stroke dash length]]
   cap: Efl.Gfx.Cap; [[Stroke cap]]
   join: Efl.Gfx.Join; [[Stroke join]]
+  miterlimit: double; [[Stroke miterlimit]]
 }
 
 struct @beta Efl.Gfx.Shape_Public

-- 


Reply via email to