wxGraphicsContext.SetPen(wx.Pen(*gradient_color*), 4)

Hi!

I’m stuck in a little project I’m working on.

I need to draw bezier curve through multiple points (point 0, point 1, point 2, point 3, …). This is working as I want, but with a solid color.

Now, I want to stroke the path using a linear gradient greyscale between each points:

at the point 0, it should be black (rgb(0,0,0)),

at the point 1, it should be at grey (rgb(50,50,50)),

at the point 2, it should be at grey (rgb(210,210,210)),

at the point 3, it should be at grey (rgb(70,70,70)),

and so on…

Is this possible? Did I miss something ?

Thanks a lot for your help!

Basil