Skip to content

Fix the gradient renderer's use of straight vs premultiplied alpha#1552

Merged
cameronwhite merged 1 commit into
masterfrom
fix/gradient-premult-alpha
Jun 17, 2025
Merged

Fix the gradient renderer's use of straight vs premultiplied alpha#1552
cameronwhite merged 1 commit into
masterfrom
fix/gradient-premult-alpha

Conversation

@cameronwhite
Copy link
Copy Markdown
Member

Fixes: #1543

- The start and end colors should have premultiplied alpha since they are used when modifying the image surface's data directly (see `GradientRenderer.ProcessGradientLine()`)

- Replace `ColorBgra.Blend()` with `ColorBgra.Lerp()` for premultiplied alpha (#1546)

Fixes: #1543
@cameronwhite cameronwhite merged commit 95c5af6 into master Jun 17, 2025
11 checks passed
@cameronwhite cameronwhite deleted the fix/gradient-premult-alpha branch June 20, 2025 19:33
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.

[Tools] Gradient with transparency behaves weirdly on Normal blend mode

1 participant