Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bmuessig
Copy link
Contributor

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.

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.
}

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. */
Copy link
Member

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!

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants