/// <summary> /// 绘制线条 /// </summary> /// <param name="x0">线条起始点x坐标</param> /// <param name="y0">线条起始点y坐标</param> /// <param name="x1">线条结束点x坐标</param> /// <param name="y1">线条结束点y坐标</param> /// <param name="width">线条宽度</param> public ZicoxPrintClient DrawLine(int x0, int y0, int x1, int y1, int width) { var item = new DrawLineItem() { X0 = x0, Y0 = y0, X1 = x1, Y1 = y1, Width = width, }; this.LineList.Add(item); return(this); }
/// <summary> /// 绘制线条 /// </summary> /// <param name="pageWidth">页宽度</param> /// <param name="pageHeight">页高度</param> /// <param name="item">绘制线条明细</param> public void DrawLine(int pageWidth, int pageHeight, DrawLineItem item) => Writer.WriteLine($"LINE {item.X0} {item.Y0} {item.X1} {item.Y1} {item.Width}");