1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-09-17 15:37:34 +03:00

Fix domain for gradients

This commit is contained in:
Guillaume Ayoub 2022-05-23 15:57:56 +02:00
parent 3ec5e8fbd8
commit 61ee64ecac

View File

@ -218,7 +218,7 @@ def draw_gradient(svg, node, gradient, font_size, opacity, stroke):
encode = (len(colors) - 1) * (0, 1)
bounds = positions[1:-1]
sub_functions = (
group.create_interpolation_function((0, 1), c0, c1, n)
group.create_interpolation_function(domain, c0, c1, n)
for c0, c1, n in color_couples)
function = group.create_stitching_function(
domain, encode, bounds, sub_functions)