using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PDFSettings
{

    public class PDFBackgroundList : List<PDFBackgroundItem>
    {

    }

    public class PDFBackgroundItem : EventArgs
    {
        /// <summary>
        /// 模板名称
        /// </summary>
        public string templeteName = "Background";

        /// <summary>
        /// 文档背景类型
        /// </summary>
        public ComPDFKit.PDFDocument.C_Background_Type type = ComPDFKit.PDFDocument.C_Background_Type.BG_TYPE_COLOR;

        /// <summary>
        /// 背景颜色
        /// </summary>
        public byte[] bgColor = new byte[] { 255, 0, 0 };

        /// <summary>
        /// 页码范围
        /// </summary>
        public string pageRange;

        /// <summary>
        /// 水平位置
        /// </summary>
        public ComPDFKit.PDFDocument.C_Background_Horizalign horizalign = ComPDFKit.PDFDocument.C_Background_Horizalign.BG_HORIZALIGN_CENTER;

        /// <summary>
        /// 水平偏移量
        /// </summary>
        public float horizOffset = 0;


        public string previeImagePath = "";

        /// <summary>
        /// 图片数据缓存路径
        /// </summary>
        public string imagepath = "";

        /// <summary>
        /// 图片宽
        /// </summary>
        public int imageWidth;

        /// <summary>
        /// 图片高
        /// </summary>
        public int imageHeight;

        /// <summary>
        /// 透明度 0-255
        /// </summary>
        public byte opacity = 230;

        /// <summary>
        /// 旋转角度
        /// </summary>
        public float rotation = 0;

        /// <summary>
        /// 图片缩放比例
        /// </summary>
        public float scale = 1;


        /// <summary>
        /// 垂直位置    
        /// </summary>
        public ComPDFKit.PDFDocument.C_Background_Vertalign vertalign = ComPDFKit.PDFDocument.C_Background_Vertalign.BG_VERTALIGN_CENTER;

        /// <summary>
        /// 垂直偏移量
        /// </summary>
        public float vertOffset = 0;

        /// <summary>
        /// 水平间距
        /// </summary>
        public float horizontalSpacing = (float)(10 * Helpers.Dpi / 25.4);
        /// <summary>
        /// 垂直间距
        /// </summary>
        public float verticalSpacing = (float)(20 * Helpers.Dpi / 25.4);

        /// <summary>
        /// 能否打印
        /// </summary>
        public bool isCanPrint = true;
        public bool isCanView = true;
        

        /// <summary>
        /// 页面选择的范围 ALL ODD EVEN 1-5(传入用户输入的字符串)
        /// </summary>
        public string pageangeMode = "ALL";
    }
}
