Reputation: 2002
I've faced a problem in Qt where I need to draw lines with borders (I have coordinates for nodes and I am just drawing simple thick line from node to node). Just like this: http://img23.imageshack.us/img23/3596/askej.jpg
At first I tried to draw thicker red line and after that black line, but I got inappropriate connecting as you can see at the image above.
Moreover the idea in which we draw all red lines and after that all black lines won't work as well. The lines can be crossed so with this idea we won't have borders over the crossing another line.
Could somebody help me with this problem, please? Thanks.
// feel free to show me mistakes in my english too
Upvotes: 0
Views: 463
Reputation: 4266
I have exactly this situation in a GIS app (Merkaartor)
You need to work by layers, where all paths on the same layer will first be drawn red then black.
For instance, layer -1 would be tunnels, you draw them first, red then black, then layer 0 are surface roads, you draw them red then black, then layer 1 are bridges, etc...
This properly render a "map" feeling.
Upvotes: 1