Wiki page padding changed with summary [refactoring developer docs] by Andrew Williams

This commit is contained in:
Andrew Williams 2017-10-20 09:03:09 -07:00 committed by apache
parent 2d0e41722c
commit 438b938fe0
1 changed files with 1 additions and 33 deletions

View File

@ -1,33 +1 @@
Go back to [[:docs:efl:advanced:eflgfxfilters|Efl.Gfx.Filter]].
==== Padding ====
The function ''padding_set'' can be used to forcily set a specific padding for this filter, regardless of the other operations.
== Syntax ==
<code Lua>
padding_set ({ l, r = [l], t = [r], b = [t] })
</code>
== Parameters ==
|''l'' |Padding on the left side in pixels. |
|''r'' |Padding on the right side in pixels. If unset, defaults to ''l''. |
|''t'' |Padding on the top in pixels. If unset, defaults to ''r''. |
|''b'' |Padding on the bottom in pixels. If unset, defaults to ''t''. |
All values must be >= 0. When filtering 'filled' images, some values may be too high and would result in completely hiding the image.
It is not possible to set only one of those without forcing the others as well. 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 ==
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.
<code Lua padding_set.lua>
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' })
</code>
{{:docs:efl:advanced:filter-padding.png|}}
This page is redirected to [[:develop:efl:advanced:eflgfxfilter:padding]].