Gradient Pipe Effect

I was pleased to hear that the GoDiagram 2.4 has the new GradientColorLink class. I was playing with this new class to see if I could use it in an application that I am making that involves links that look like Pipes.

I couldn’t figure out how to make the GradientColorLink class to do a gradient on the width of the link (not a gradient that goes linearly from one port to the other).

Can you give me some pointers on how I can tweak the GradientColorLink class to draw gradients on the width of the link?

There’s no easy way to do that. Basically you’ll need to use separate brushes for each section of the link.
But if you just want the gradient to be the same everywhere across the link, regardless of the angle of the link at any spot, perhaps you could simulate it pretty well by using several strokes, with the widest in the back, and the narrowest in the front.
That’s a generalization of what the Pipe class does in the InstrumentDemo example, where it just uses the two predefined pens: the GoStroke.Pen and the GoStroke.HighlightPen. Look in the constructor.