Go back to 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.

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' })