script: add Image.Crop(x, y, width, height)

System Internals / Plymouth - J-P Nurmi [gmail.com] - 11 March 2020 13:44 UTC

The script plugin currently allows pixel buffers to be resized and scaled, but provides no mechanism for script theme authors to just crop the buffer, which is necessary for images that cannot be stretched, such as progress bars with gradients.

This commit adds that feature as a new Crop method.

f4cf64a script: add Image.Crop(x, y, width, height)
src/plugins/splash/script/script-lib-image.c | 28 +++++++++++++++++++++++
src/plugins/splash/script/script-lib-image.script | 5 ++++
2 files changed, 33 insertions(+)

Upstream: cgit.freedesktop.org


  • Share