update draw line func