www-content/pages/docs/efl/advanced/eflgfxfilter/fill.txt

33 lines
1.1 KiB
Plaintext

Go back to [[:docs:efl:advanced:eflgfxfilters|Efl.Gfx.Filter]].
==== Fill ====
Fill a buffer with a specific color. Does not blend, can be used to clear a buffer.
<note tip>This function should preferrably be used only for debugging purposes.</note>
== Syntax ==
<code Lua>
fill ({ dst = output, color = 'transparent', l = 0, r = 0, t = 0, b = 0 })
</code>
== Parameters ==
|''dst'' |Target buffer to fill with color. |
|''color'' |The color used to fill the buffer. All pixels within the fill area will be reset to this value. See [[colors]]. |
|''l'' |Left padding: skip ''l'' pixels from the left border of the buffer. |
|''r'' |Right padding: skip ''r'' pixels from the right border of the buffer. |
|''t'' |Top padding: skip ''t'' pixels from the top border of the buffer. |
|''b'' |Bottom padding: skip ''b'' pixels from the bottom border of the buffer. |
== Examples ==
<code Lua>
fill { color = 'darkblue' }
</code>
{{:docs:efl:advanced:filter-fill.png|}}
<code Lua>
padding_set(20)
fill { output, 'blue', 5, 10, 20, 50 }
blend { color = 'silver' }
</code>
{{:docs:efl:advanced:filter-fillpad.png|}}