New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(draw_sw): implemented radial gradient background #6170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, just a few minor comments at first look.
src/draw/sw/lv_draw_sw_gradient.c
Outdated
#if LV_USE_DRAW_SW_COMPLEX_GRADIENTS | ||
|
||
/* | ||
// Integer Square Root function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Integer Square Root function | |
Integer Square Root function |
@zjanosy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not done reviewing yet but here are some comments so far.
@kisvegabor, FYI, another instance of CI failing due to a memory error in the RLE decompressor. This time on 32 bit x86. Before it was 64 bit ARM. |
… inside the starting circle.
…t with othe defines. Added config option to Kconfig and lv_conf_template.
…check for simple cases (e.g. concentric circles).
… linear gradient defined by two points.
…ircle instead of center and radius. This makes it possible to use percentages for the size of the gradient.
…corners) was updated, opacity was not used.
…acity, and render into separate images with opacity (that's how other render tests worked).
…er result alternative to lv_sqrt).
…various gradient backgrounds on a button.
…rototype, but not the implementation Co-authored-by: Liam <[email protected]>
Impressive mathematics. If there were any more than the 3 added types of gradient and they also had the same function signatures for |
Let's have something merged first and we can improve it later as we will have some feedback 🙂 |
Thank you @zjanosy! 😊 |
Description of the feature or fix
Implemented radial gradient background. Work in progress. For internal testing only.
Notes
Added example lv_example_styles_16.c. To test you need to add
#define LV_DRAW_SW_COMPLEX_GRADIENTS 1
to lv_conf.h, and add
extern "C" { void lv_example_style_16(void); }
to main.