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

Blending #3

Closed
Ogeon opened this issue Dec 15, 2015 · 2 comments
Closed

Blending #3

Ogeon opened this issue Dec 15, 2015 · 2 comments
Milestone

Comments

@Ogeon
Copy link
Owner

Ogeon commented Dec 15, 2015

There should be support for the common blending functions, like add, subtract, screen, overlay, etc. This may be restricted to RGB, unless it's intuitive in other spaces as well.

@retep998
Copy link

I don't know of any color spaces other than linear RGB that guarantee being able to trivially blend colors and get the correct result.

@Ogeon
Copy link
Owner Author

Ogeon commented Jan 12, 2016

Yeah, I think so too. This will most likely end up being an Rgb and Color exclusive feature.

@Ogeon Ogeon added this to the 0.2.1 milestone Jan 29, 2016
@homu homu closed this as completed in #39 Feb 23, 2016
homu added a commit that referenced this issue Feb 23, 2016
Implement color blending

This introduces the `Blend` trait, which implements proper color blending for colors where it makes sense. The introduction of this trait includes:

 * Implementation of OpenGL style blending, with blending equations and blending parameters.
 * Implementation of most of the [SVG composition operators](https://www.w3.org/TR/SVGCompositing/#containerElementCompositingOperators) (also common in photo manipulation software).
 * Introduction of a type for premultiplied alpha, which is useful for lengthy composition chains.
 * Introduction of the `ComponentWise` trait, with functions for repeatedly performing actions on each component of a color. It's restricted to colors where all of the components are of the same type.

Closes #3.
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

No branches or pull requests

2 participants