布雷森汉姆直线算法 参考 https://zh.wikipedia.org/wiki/布雷森漢姆直線演算法 https://blog.oldj.net/2010/08/27/bresenham-algorithm/