Skip to content

Conversation

@sagudev
Copy link
Contributor

@sagudev sagudev commented Oct 6, 2025

We currently roll own version in vello classic, but it would be nice to upstream this: linebender/vello#1268 (comment). IMO it would make more sense to have lerp_rect_premultiplied, but we do not want breaking changes.

@sagudev
Copy link
Contributor Author

sagudev commented Oct 6, 2025

Should we add this method to other color types too?

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
f
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Copy link
Member

@tomcur tomcur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the usefulness of this method: there are similar arguments for this as for the unpremultiplied interpolation/gradient support we've added (#191).

However, this work and the prior work on interpolation/gradients introduces noise to the API with what is arguably the wrong behavior for most use-cases, and that noise has to be justified. Correctly implementing interpolation/gradients is very much non-trivial, which to me justifies that noise. I'm much less sure about the method proposed here, as the implementation is straightforward enough for users of Color that need this to implement themselves.

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.

2 participants