Skip to content

Add a replacement for ColorBgra.Blend() which didn't use premultiplied alpha#1546

Merged
cameronwhite merged 1 commit into
masterfrom
fix/colorbgra-blend
Jun 15, 2025
Merged

Add a replacement for ColorBgra.Blend() which didn't use premultiplied alpha#1546
cameronwhite merged 1 commit into
masterfrom
fix/colorbgra-blend

Conversation

@cameronwhite

Copy link
Copy Markdown
Member

This is named Lerp() to match the existing float-based lerp methods. The usages of the old Blend() method should be replaced in future commits since it's very error-prone (Cairo surfaces store premultiplied alpha)

Bug: #1543

…d alpha

This is named Lerp() to match the existing float-based lerp methods. The usages of the old Blend() method should be replaced in future commits since it's very error-prone (Cairo surfaces store premultiplied alpha)

Bug: #1543
@cameronwhite cameronwhite merged commit db578ff into master Jun 15, 2025
11 checks passed
@cameronwhite cameronwhite deleted the fix/colorbgra-blend branch June 15, 2025 02:52
cameronwhite added a commit that referenced this pull request Jun 15, 2025
- 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 added a commit that referenced this pull request Jun 17, 2025
- 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
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.

1 participant