using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
namespace HTEXLib
{
///
/// 对元素的边框,填充支撑如何
///
public class Fill
{
public Fill() {
}
///
/// https://www.cnblogs.com/coco1s/p/8080211.html 图案的前景色 背景色
/// [a:noFill, solidFill, gradFill, blipFill, pattFill, grpFill]
///-1 则说明需要继承ShapeStyle 的LineColor , 0,无填充 1.纯色填充 2.渐变填充 3.图片或纹理填充 4.图案填充
///
public int? type { get; set; }
public string solidFill { get; set; }
public HtexBlipFill blipFill { get; set; }
public HtexGradientFill gradientFill { get; set; }
public HtexPattFill pattFill { get; set; }
//public HtexOutline outline { get; set; }
//public Border border { get; set; }
}
///
/// 3.图片或纹理填充
///
///
/// 3.图片或纹理填充
///
public class HtexBlipFill {
public Vector fillRect { get; set; }
public string url { get; set; }
///
/// base64,link
///
// public string urlType { get; set; }
//public string contentType { get; set; }
public string dip { get; set; }
public bool rotWithShape { get; set; } = true;
public double opacity { get; set; } = 0;
public HtexTile tile { get; set; }
}
public class HtexTile{
public string algn { get; set; } //Alignment 对齐方式
public string flip { get; set; }//Tile Flipping 镜像类型
public double tx { get; set; }//Horizontal Offset 水平偏移量
public double ty { get; set; }//Vertical Offset 垂直偏移量
public double sx { get; set; }//Horizontal Ratio 水平刻度
public double sy { get; set; }//Vertical Ratio 垂直刻度
}
public class HtexPattFill {
///
/// https://www.cnblogs.com/jxsoft/archive/2011/04/01/2001942.html
/// System.Drawing.Drawing2D.HatchStyle
/// https://github.com/CXuesong/PrettyReport/blob/1eaf0da8fd419627cfb418a1f7a7e229a543e681/SpreadsheetLightX25/Drawing/SLDrawingTool.cs
/// 类型 前景色 背景色
// HatchBrush myHatchBrush = new HatchBrush(HatchStyle.Vertical, Color.Blue, Color.Green);
/// 图案填充的内置图形 ltDnDiag 等 48种内置图案
///
public string prst { get; set; }
///
///前景色
///
public string fgClr { get; set; }
///
/// 背景色
///
public string bgClr { get; set; }
public string base64 { get; set; }
}
public class HtexGradientFill
{
public bool RotateWithShape { get; set; } = true;
public string flip { get; set; }
///
/// line 线性 ,path 路径
///
public string type { get; set; }
///
/// 颜色色带终结
///
public List colors { get; set; } = new List();
///
/// tileRect TileRectangle (平铺矩形) 右下角是一个矩形
///
public Vector tileRect { get; set; }
public LineFill line { get; set; }
public PathFill path { get; set; }
}
public class LineFill
{
public double? rot { get; set; }
public string scaled { get; set; }
}
public class PathFill
{
///
///circle
///rect
///shape
///
public string pathType { get; set; }
public Vector fillToRect { get; set; }
}
public class ColorPosition
{
public string Color { get; set; }
public double Position { get; set; }
}
///
/// 偏移向量
///
public class Vector
{
//四个方向的偏移量,矩形的下边缘。例如50000/1000= 50% ,辐射百分比
public int? b { get; set; }
public int? l { get; set; }
public int? r { get; set; }
public int? t { get; set; }
}
}