-
Notifications
You must be signed in to change notification settings - Fork 535
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
Some improvements to alpha blending in GDI #460
base: master
Are you sure you want to change the base?
Conversation
This does still not work, but it corrects a few bugs that would additionally hinder it from working. When moving the cursor over the gradient, it does now flicker and "try" to display a gradient. At this point, I am not sure which component is not properly supporting the alpha channel and causing the gradient to not display properly.
demo/gdi/nuklear_gdi.h
Outdated
} | ||
|
||
static void | ||
nk_gdi_rect_multi_color(HDC dc, short x, short y, unsigned short w, | ||
unsigned short h, struct nk_color left, struct nk_color top, | ||
struct nk_color right, struct nk_color bottom) | ||
{ | ||
/* Note that GDI (without plus) does not appear to support alpha transparency properly in gradients. */ |
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.
Could you also add one or two words about how it manifests itself visually (I mean the "flickering")? Thanks!
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.
Sure, when hovering and moving the mouse over the color picker matrix, the displayed gradient flickers to black.
I've prepared a short video: https://www.youtube.com/watch?v=oaEzvqKD_fo
This does still not work, but it corrects a few bugs that would additionally hinder it from working.
When moving the cursor over the gradient, it does now flicker and "appear" to display a gradient (probably just a redraw effect).
At this point, I am not sure which component is not properly supporting the alpha channel and causing the gradient to not display properly. From what I gathered searching, it is probably 37-year-old GDI itself.