optimize drawline for variable doesn't change

使用绘制起始点和终止点的直线来代替绘制所有的点,减小cpu和内存的压力

Signed-off-by: xiehuc <xiehuc@gmail.com>