using System; using System.Collections.Generic; using System.Text; namespace HTEXLib { public class Shape : Item { public string shapeType; public List paragraph { get; set; } public HTEXLib.Models.HTEX.ShapeStyle style { get; set; } = new Models.HTEX.ShapeStyle(); //public List ShapeGuides { get; set; } //public List Paths { get; set; } //public string BorderSha { get; set; } //public string FillSha { get; set; } } public class Svg { public string id { get; set; } //public string Width { get; set; } //public string Height { get; set; } //public string Top { get; set; } //public string Left { get; set; } //public string Style { get; set; } public List svgShape { get; set; } //public string Defs { get; set; } // public string Transform { get; set; } // public string SvgData { get; set; } } public abstract class SvgShape { // rect ,circle ,ellipse ,line ,polygon ,polyline ,path public string type { get; set; } // public string Style { get; set; } // public string Stroke { get; set; } //描边的不透明度 // public string StrokeOpacity { get; set; } = "1"; // public string StrokeWidth { get; set; } // 虚线类型描边 // public string StrokeDasharray { get; set; } // public string Fill { get; set; } public string transform { get; set; } public string start { get; set; } public string end { get; set; } /// /// 头部宽度 lg Large ,med Medium ,sm Small /// public string start_w { get; set; } /// /// 结束宽度 /// public string end_w { get; set; } /// /// 头部长度 lg Large ,med Medium ,sm Small /// public string start_len { get; set; } /// /// 结束长度 /// public string end_len { get; set; } //填充色的不透明度 // public string FillOpacity { get; set; } = "1"; } public class Rect : SvgShape { //矩形左上角的x位置 public string x { get; set; } //矩形左上角的y位置 public string y { get; set; } //矩形的宽度 public string width { get; set; } //矩形的高度 public string height { get; set; } // 圆角的x方位的半径 public string rx { get; set; } // 圆角的y方位的半径 public string ry { get; set; } } public class Circle : SvgShape { //圆的半径 public string r { get; set; } //圆心的x位置 public string cx { get; set; } //圆心的y位置 public string cy { get; set; } } public class Ellipse : SvgShape { // 椭圆的x方位的半径 public string rx { get; set; } // 椭圆的y方位的半径 public string ry { get; set; } //椭圆的x位置 public string cx { get; set; } //椭圆的y位置 public string cy { get; set; } } public class Line : SvgShape { //起点的x位置 public string x1 { get; set; } //起点的Y位置 public string y1 { get; set; } //终点的X位置 public string x2 { get; set; } //终点的Y位置 public string y2 { get; set; } } public class Polyline : SvgShape { /// /// 点集数列。每个数字用空白、逗号、终止命令符或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。 /// public string points { get; set; } } public class Polygon : SvgShape { /// /// 点集数列。每个数字用空白符、逗号、终止命令或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。 /// 所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。路径绘制完后闭合图形,所以最终的直线将从位置(2,2)连接到位置(0,0)。 /// public string points { get; set; } } public class SvgPath : SvgShape { public string d { get; set; } } }