使用Bresenham算法生成直线.Bresenham算法的基本原理就是将光栅设备的各行各列象素中心连接起来构造一组虚拟网格线。按直线从起点到终点的顺序计算直线与各垂直方向网格线的交点,然后确定该列象素中与此交点最近的象素。-Using the Bresenham algorithm to generate a straight line.The basic principle of Bresenham algorithm is to each row of each column of pix