[cairo] Flip offsets when reversing

Fixes many of the var_colrv1 first row tests.

https://roettsch.es/var_colrv1.html
This commit is contained in:
Behdad Esfahbod 2023-01-25 15:31:29 -07:00
parent 5b05e198cf
commit ea316b56a0
1 changed files with 2 additions and 0 deletions

View File

@ -598,6 +598,8 @@ _hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops,
for (unsigned i = 0; i < n_stops - 1 - i; i++) for (unsigned i = 0; i < n_stops - 1 - i; i++)
hb_swap (stops[i], stops[n_stops - 1 - i]); hb_swap (stops[i], stops[n_stops - 1 - i]);
for (unsigned i = 0; i < n_stops; i++)
stops[i].offset = 1 - stops[i].offset;
} }
if (n_stops > PREALLOCATED_COLOR_STOPS) if (n_stops > PREALLOCATED_COLOR_STOPS)