Open LBdN opened 3 years ago
As a workaround, you can use color_gradient()
just like circle()
does under the hood, but passing some value to vector
clip.mask.get_frame = lambda t: color_gradient(
size=(clip.w,clip.h),
p1=(clip.w/2,clip.h/4),
vector=[1], # this is ignored if 'r' is present and shape is 'radial'
r=max(0,int(800-200*t)),
shape='radial',
col1=1, col2=0, offset=0.9
)
Note: there is another bug related to the vector argument because the function tries to check if it exists using if vector: ...
and throws:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
So I think the only constraint for this use case is that it must have only one element.
Expected Behavior
getting a numpy array.
Actual Behavior
exception on line 144 in the drawing module.
Possible Fix.
change the test on vector variable.
Steps to Reproduce the Problem
Specifications