efl: Add simple API for "blur" effects

This will use the Efl.Gfx.Filter interface internally, but makes it
usable by normal people.
This commit is contained in:
Jean-Philippe Andre 2017-12-14 17:23:46 +09:00
parent 88bfba1fdd
commit 00bb3bd3c7
4 changed files with 44 additions and 0 deletions

View File

@ -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 \

View File

@ -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"

View File

@ -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.]]
}
}
}
}

View File

@ -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"