diff --git a/Kconfig b/Kconfig index eac5eb9d48..ca0d8da2c6 100644 --- a/Kconfig +++ b/Kconfig @@ -167,6 +167,36 @@ menu "LVGL configuration" save the continuous open/decode of images. However the opened images might consume additional RAM. + config LV_GRADIENT_MAX_STOPS + int "Number of stops allowed per gradient." + default 2 + help + Increase this to allow more stops. + This adds (sizeof(lv_color_t) + 1) bytes per additional stop + + config LV_GRAD_CACHE_DEF_SIZE + int "Default gradient buffer size." + default 0 + help + When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again. + LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes. + If the cache is too small the map will be allocated only while it's required for the drawing. + 0 mean no caching. + + config LV_DITHER_GRADIENT + bool "Allow dithering the gradients" + help + Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display) + LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface + The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion + + config LV_DITHER_ERROR_DIFFUSION + bool "Add support for error diffusion dithering" + depends on LV_DITHER_GRADIENT + help + Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing. + The increase in memory consumption is (24 bits * object's width) + config LV_DISP_ROT_MAX_BUF int "Maximum buffer size to allocate for rotation" default 10240 diff --git a/docs/overview/style-props.md b/docs/overview/style-props.md index 12a4869821..3eeaa8dd01 100644 --- a/docs/overview/style-props.md +++ b/docs/overview/style-props.md @@ -252,8 +252,8 @@ Set the point from which the background's gradient color should start. 0 means t
  • Ext. draw No
  • -### bg_gradient -Set the gradient definition for the body. The pointed instance must exist while the object is alive. NULL to disable +### bg_grad +Set the gradient definition. The pointed instance must exist while the object is alive. NULL to disable. It wraps `BG_GRAD_COLOR`, `BG_GRAD_DIR`, `BG_MAIN_STOP` and `BG_GRAD_STOP` into one descriptor and allows craeting gradients with more colors too.