The screenshot here shows my problem.
I'm trying to draw a multicoloured line. Its not a straight line, it curves a lot and irregularly. To make this I've set up a number of different lines and set them overlapping each other. Which...sort of works. Though it gives the problem on the left, I have to very exactly manually get things just right or else I get issues like the too small white on the left.
To solve this I tried to join the lines... but this gives the problem on the right. Part of my line needs to be curved, but the white rectangle inside the line should have a square edge. The curve itself has also became distorted.
What is the 'correct' way to draw a multicoloured line like this, ensuring its internal segments remain square and the curves do not alter when I join them?