See https://acegikmo.com/shapes/docs/#anti-aliasing Decrease opacity with distance from the centre of the line.