diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2014-05-09 14:22:59 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2014-05-09 16:57:39 +0900 |
commit | 139f7bc178dfae7c05b7f68c9fc448289bb15cd9 (patch) | |
tree | 6f3729ba556b571dc2ebaa1306e39d88de959433 | |
parent | 87e09ff25ec51a96f3543896651d297aeda58ac1 (diff) | |
download | efl-139f7bc178dfae7c05b7f68c9fc448289bb15cd9.tar.gz |
Evas doc: Add example for padding_set (filters)
With preview and all.
-rw-r--r-- | doc/previews/Makefile.am | 3 | ||||
-rw-r--r-- | src/examples/evas/filters/filter_padding.lua | 7 | ||||
-rw-r--r-- | src/lib/evas/filters/evas_filter_parser.c | 10 |
3 files changed, 19 insertions, 1 deletions
diff --git a/doc/previews/Makefile.am b/doc/previews/Makefile.am index 3b09953ac1..b711b8b465 100644 --- a/doc/previews/Makefile.am +++ b/doc/previews/Makefile.am @@ -39,7 +39,7 @@ DATADIR = ${abs_top_srcdir}/doc/previews/img HTMLDIR = ${abs_top_srcdir}/doc/html PREVIEWS = blend blur bump curve grow mask transform \ -example_1 +example_1 padding previews-data: preview_text_filter $(MKDIR_P) $(DATADIR) @@ -48,6 +48,7 @@ previews-data: preview_text_filter echo " GEN filter_$${a}.png" ; \ FONT="Sans" ; \ SIZE=24 ; \ + TEXT="TEXT" ; \ FILTER=`cat ${top_srcdir}/src/examples/evas/filters/filter_$${a}.lua` ; \ if [ -e ${top_srcdir}/doc/previews/filter_$${a}.sh ] ; then \ source ${top_srcdir}/doc/previews/filter_$${a}.sh ; \ diff --git a/src/examples/evas/filters/filter_padding.lua b/src/examples/evas/filters/filter_padding.lua new file mode 100644 index 0000000000..ec02abcdca --- /dev/null +++ b/src/examples/evas/filters/filter_padding.lua @@ -0,0 +1,7 @@ +fat = buffer ('alpha') +padding_set ({ l = 10, r = 20, t = 15, b = 25 }) +fill ({ color = 'black' }) +fill ({ color = 'darkblue', l = 2, r = 2, t = 2, b = 2 }) +grow ({ 30, dst = fat }) +blur ({ 40, src = fat, color = 'white' }) +blend ({ color = 'darkblue' }) diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c index 96583ee2cf..d535748bfc 100644 --- a/src/lib/evas/filters/evas_filter_parser.c +++ b/src/lib/evas/filters/evas_filter_parser.c @@ -1527,6 +1527,16 @@ _padding_set_padding_update(Evas_Filter_Program *pgm, A common use case will be when changing a blur size during an animation, or when applying a mask that will hide most of the (blurred) text. + Example (the @c fill command is used for illustration purposes): + @verbinclude filter_padding.lua + + This will set the left, right, top and bottom paddings to their respective values, + and some effects may look like they've been "clipped" out. + + <center> + @image html filter_padding.png + </center> + @since 1.10 */ |