I am trying to add the gradient effect of the small arc in my canvas image. Using
context.createLinearGradient(0, 0, 400. 400);
secondGradient.addColorStop(0, 'white');
secondGradient.addColorStop(0.2, 'black');
secondGradient.addColorStop(0.8, 'black');
secondGradient.addColorStop(1, 'white');
But unable to get the expected results, also would be great if someone can explain how createLinearGradient works with circle.
the idea is to have the edge effect of the arc's end. If I had to guess, I think I am doing something wrong with the context.createLinearGradient(0, 0, 400. 400); part.
Thanks in advance.