RFR: 8332895: Support interpolation for backgrounds and borders [v2]

Michael Strauß mstrauss at openjdk.org
Fri Aug 2 02:15:35 UTC 2024


On Thu, 1 Aug 2024 23:49:08 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixed a bug
>
> modules/javafx.graphics/src/main/java/javafx/scene/paint/Color.java line 1956:
> 
>> 1954: 
>> 1955:         // If both instances are equal, return this instance to prevent the creation of numerous small objects.
>> 1956:         if (t <= 0.0 || equals(endValue)) return this;
> 
> This question might be outside of the current PR, but I think the naive color interpolation algorithm is a bad choice here (L1960).
> 
> See for example
> https://www.alanzucconi.com/2016/01/06/colour-interpolation/
> 
> The question that is relevant to this PR is whether we should enable the user to specify the interpolation algorithm.

CSS Transitions 1 is a feature-complete spec, and it doesn't include an option to specify the transition color space. That might come with CSS Transitions 2, but it's not there yet. I think we should revisit this once the feature has landed in the spec.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1701105059


More information about the openjfx-dev mailing list