extracted beginPath and stroke from drawSegment