jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=00bb3bd3c7781f76ca8010f44dc6998f6bbff89d
commit 00bb3bd3c7781f76ca8010f44dc6998f6bbff89d Author: Jean-Philippe Andre <[email protected]> Date: Thu Dec 14 17:23:46 2017 +0900 efl: Add simple API for "blur" effects This will use the Efl.Gfx.Filter interface internally, but makes it usable by normal people. --- src/Makefile_Efl.am | 1 + src/lib/efl/Efl.h | 1 + src/lib/efl/interfaces/efl_gfx_blur.eo | 41 ++++++++++++++++++++++++++++ src/lib/efl/interfaces/efl_interfaces_main.c | 1 + 4 files changed, 44 insertions(+) diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 8ddbe80c38..243a04eac1 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -40,6 +40,7 @@ efl_eolian_files = \ lib/efl/interfaces/efl_gfx_gradient_linear.eo \ lib/efl/interfaces/efl_gfx_gradient_radial.eo \ lib/efl/interfaces/efl_gfx_filter.eo \ + lib/efl/interfaces/efl_gfx_blur.eo \ lib/efl/interfaces/efl_gfx_size_hint.eo \ lib/efl/interfaces/efl_model.eo \ lib/efl/interfaces/efl_animator.eo \ diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index b0a258b36c..eb9e5f17ec 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -123,6 +123,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_gfx_gradient_linear.eo.h" #include "interfaces/efl_gfx_gradient_radial.eo.h" #include "interfaces/efl_gfx_filter.eo.h" +#include "interfaces/efl_gfx_blur.eo.h" #include "interfaces/efl_gfx_size_hint.eo.h" #include "interfaces/efl_gfx_color_class.eo.h" #include "interfaces/efl_gfx_text_class.eo.h" diff --git a/src/lib/efl/interfaces/efl_gfx_blur.eo b/src/lib/efl/interfaces/efl_gfx_blur.eo new file mode 100644 index 0000000000..7e35ee20e5 --- /dev/null +++ b/src/lib/efl/interfaces/efl_gfx_blur.eo @@ -0,0 +1,41 @@ +interface Efl.Gfx.Blur +{ + [[A simple API to apply blur effects. + + Those API's might use @Efl.Gfx.Filter internally. It might be necessary to + also specify the color of the blur with @Efl.Gfx.color. + ]] + methods { + @property radius { + [[The blur radius in pixels.]] + values { + rx: double; [[The horizontal blur radius.]] + ry: double; [[The vertical blur radius.]] + } + } + @property offset { + [[An offset relative to the original pixels. + + This property allows for drop shadow effects. + ]] + values { + ox: double; [[Horizontal offset in pixels.]] + oy: double; [[Vertical offset in pixels.]] + } + } + @property grow { + [[How much the original image should be "grown" before blurring. + + Growing is a combination of blur & color levels adjustment. If the + value of grow is positive, the pixels will appear more "fat" or "bold" + than the original. If the value is negative, a shrink effect happens + instead. + + This is can be used efficiently to create glow effects. + ]] + values { + radius: double; [[How much to grow the original pixel data.]] + } + } + } +} diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index ea97773e27..3f19f054f8 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -38,6 +38,7 @@ #include "interfaces/efl_gfx_gradient_radial.eo.c" #include "interfaces/efl_gfx_filter.eo.c" +#include "interfaces/efl_gfx_blur.eo.c" #include "interfaces/efl_gfx_size_hint.eo.c" #include "interfaces/efl_canvas.eo.c" --
