I just want to know, is it possible to apply gradient along the stroked Path…
The ColourGradient Should be applied from the Stroked Left to Stroked Right along the path…
For Example,
If i have a Colourgradient with Colour red on Both ends and Blue at the middle…
Giving the stroked path of the Rectangle should make the Rectangle look like drawn with three outline colour…
If I understand you right, then no - gradients are fixed relative to the origin, and not relative to any part of the path that you’re filling. You’d need to do a bit of maths and create special gradients for each different area that you’re trying to draw.
But i have a small doubt, for the path connecting using straight lines i can do…
But for the curves, i have no idea…
Is it possible to do radial gradient other than round shape…
Like Ellipse… If it is possible it’ll help somehow…
Well, you can do non-circular gradients, but not quadratic ones! The only way you could sensibly do it would be by flattening the path and making sure all the line sements join up neatly… definitely not a trivial problem!
If you’re trying to make a gradient fit a cubic spline path then you’re probably wasting your time, but the GradientBrush lets you apply an affine transform.