Is it possible in QGIS to apply a gradient to linear features? I'd like for some roads to fade from opaque to transparent as they get further away from some set of points. I can measure the distance to any node on the line and thus for each line could define a start and end distance to base the gradient on.
I've approximated the effect I want by splitting my roads into shorter two-node segments and applying color based on the distance to the second node. The effect however is quite discontinuous and there are many more points where semi-transparent lines overlap slightly than there would be if I was using the original linestrings.
Is there any way to make this look a bit better?
(Related questions which I hope are outdated now: Gradient colour for lines, How to visualize measure values along linestrings in QGIS?)