Ejemplo n.º 1
0
        /// <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 DrawBox(int x0, int y0, int x1, int y1, int width)
        {
            var item = new DrawBoxItem()
            {
                X0    = x0,
                Y0    = y0,
                X1    = x1,
                Y1    = y1,
                Width = width,
            };

            this.BoxList.Add(item);
            return(this);
        }
 /// <summary>
 /// 打印矩形
 /// </summary>
 /// <param name="pageWidth">页宽度</param>
 /// <param name="pageHeight">页高度</param>
 /// <param name="item">打印矩形明细</param>
 public void DrawBox(int pageWidth, int pageHeight, DrawBoxItem item) =>
 Writer.WriteLine($"BOX {item.X0} {item.Y0} {item.X1} {item.Y1} {item.Width}");