Avoiding blurry lines when drawing to the canvas