Files
gtk/gsk
Benjamin Otte a05a021fd1 rendernode: Fix Cairo rendering of repeating gradients
Cairo and the GL renderer have a different idea of how to handle
transitioning of colors outside the defined range.

Consider these stops:
  black 50%, white 50%

What color is at 0%?

Cairo would transition between the last and first stop, ie it'd do a
white-to-black transition and end up at rgb(0.5,0.5,0.5) at 0%.
GL would behave as it would for non-repeating gradients and use black
for the range [0%..50%] and white for [50%..100%].
The web would rescale the range so the first stop would be at 0% and
the last stop would be at 100%, so this gradient would be illegal.

Considering that it's possible for code to transition between the
different behaviors by adding explicit stops at 0%/100%, I could choose
any method.
So I chose the simplest one, which is what the GL renderer does and
which treats repeating and non-repeating gradients the same.

Tests attached.
2023-09-07 16:19:20 +02:00
..
2023-08-07 13:02:57 -04:00
2023-08-29 12:58:30 -04:00
2023-08-29 12:58:30 -04:00
2023-08-25 20:16:49 -04:00
2020-07-25 00:47:36 +02:00
2023-03-14 14:56:42 -04:00
2023-08-25 07:33:16 -04:00
2022-11-17 22:49:45 -05:00
2023-03-31 15:11:10 -04:00
2023-08-28 21:13:58 -04:00
2023-08-28 21:14:28 -04:00
2023-08-25 20:16:49 -04:00
2023-08-25 07:33:16 -04:00
2023-08-06 20:48:09 -04:00
2022-07-15 15:47:11 -04:00
2023-07-16 12:13:00 +02:00
2023-04-27 13:42:03 +02:00
2023-08-21 05:23:42 +02:00
2023-03-31 15:11:10 -04:00
2023-07-22 01:33:44 +02:00
2023-08-25 22:21:27 -04:00
2023-08-07 13:02:57 -04:00
2023-03-31 15:11:10 -04:00
2023-08-25 20:16:49 -04:00
2023-08-26 11:29:09 -04:00