From 2d0e41722c4068fbf19f5f815b93b581052650df Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 20 Oct 2017 09:03:08 -0700 Subject: [PATCH] Wiki page padding changed with summary [refactoring developer docs] by Andrew Williams --- .../efl/advanced/eflgfxfilter/padding.txt | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/develop/efl/advanced/eflgfxfilter/padding.txt diff --git a/pages/develop/efl/advanced/eflgfxfilter/padding.txt b/pages/develop/efl/advanced/eflgfxfilter/padding.txt new file mode 100644 index 000000000..4b039e5bf --- /dev/null +++ b/pages/develop/efl/advanced/eflgfxfilter/padding.txt @@ -0,0 +1,33 @@ +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 == + +padding_set ({ l, r = [l], t = [r], b = [t] }) + + +== 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. + +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' }) + +{{:docs:efl:advanced:filter-padding.png|}} \ No newline at end of file