Shape.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace TEAMModelOS.Service.Model.PowerPoint
  5. {
  6. public class Shape : Item
  7. {
  8. public string shapeType;
  9. public List<Paragraph> paragraph { get; set; }
  10. public Fill fill { get; set; }
  11. public Border border { get; set; }
  12. //public List<ShapeGuide> ShapeGuides { get; set; }
  13. //public List<Path> Paths { get; set; }
  14. //public string BorderSha { get; set; }
  15. //public string FillSha { get; set; }
  16. }
  17. public class Svg {
  18. public string id { get; set; }
  19. //public string Width { get; set; }
  20. //public string Height { get; set; }
  21. //public string Top { get; set; }
  22. //public string Left { get; set; }
  23. //public string Style { get; set; }
  24. public List<SvgShape> svgShape { get; set; }
  25. //public string Defs { get; set; }
  26. // public string Transform { get; set; }
  27. // public string SvgData { get; set; }
  28. }
  29. public abstract class SvgShape {
  30. // rect ,circle ,ellipse ,line ,polygon ,polyline ,path
  31. public string type { get; set; }
  32. // public string Style { get; set; }
  33. // public string Stroke { get; set; }
  34. //描边的不透明度
  35. // public string StrokeOpacity { get; set; } = "1";
  36. // public string StrokeWidth { get; set; }
  37. // 虚线类型描边
  38. // public string StrokeDasharray { get; set; }
  39. // public string Fill { get; set; }
  40. public string transform { get; set; }
  41. public string start { get; set; }
  42. public string end { get; set; }
  43. //填充色的不透明度
  44. // public string FillOpacity { get; set; } = "1";
  45. }
  46. public class Rect : SvgShape
  47. {
  48. //矩形左上角的x位置
  49. public string x { get; set; }
  50. //矩形左上角的y位置
  51. public string y { get; set; }
  52. //矩形的宽度
  53. public string width { get; set; }
  54. //矩形的高度
  55. public string height { get; set; }
  56. // 圆角的x方位的半径
  57. public string rx { get; set; }
  58. // 圆角的y方位的半径
  59. public string ry { get; set; }
  60. }
  61. public class Circle : SvgShape
  62. {
  63. //圆的半径
  64. public string r { get; set; }
  65. //圆心的x位置
  66. public string cx { get; set; }
  67. //圆心的y位置
  68. public string cy { get; set; }
  69. }
  70. public class Ellipse : SvgShape
  71. {
  72. // 椭圆的x方位的半径
  73. public string rx { get; set; }
  74. // 椭圆的y方位的半径
  75. public string ry { get; set; }
  76. //椭圆的x位置
  77. public string cx { get; set; }
  78. //椭圆的y位置
  79. public string cy { get; set; }
  80. }
  81. public class Line : SvgShape
  82. {
  83. //起点的x位置
  84. public string x1 { get; set; }
  85. //起点的Y位置
  86. public string y1 { get; set; }
  87. //终点的X位置
  88. public string x2 { get; set; }
  89. //终点的Y位置
  90. public string y2 { get; set; }
  91. }
  92. public class Polyline : SvgShape
  93. {
  94. /// <summary>
  95. /// 点集数列。每个数字用空白、逗号、终止命令符或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。
  96. /// </summary>
  97. public string points { get; set; }
  98. }
  99. public class Polygon : SvgShape
  100. {
  101. /// <summary>
  102. /// 点集数列。每个数字用空白符、逗号、终止命令或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。
  103. /// 所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。路径绘制完后闭合图形,所以最终的直线将从位置(2,2)连接到位置(0,0)。
  104. /// </summary>
  105. public string points { get; set; }
  106. }
  107. public class SvgPath : SvgShape
  108. {
  109. public string d { get; set; }
  110. }
  111. }