limit the drawLine length.