add beginPath at the begining of drawing a hairpin