Shape.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace HiTeachCC.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. }
  15. public class Svg {
  16. public string Id { get; set; }
  17. public string Width { get; set; }
  18. public string Height { get; set; }
  19. public string Top { get; set; }
  20. public string Left { get; set; }
  21. public string Style { get; set; }
  22. public List<SvgShape> SvgShape { get; set; }
  23. public string Defs { get; set; }
  24. public string Transform { get; set; }
  25. public string SvgData { get; set; }
  26. }
  27. public abstract class SvgShape {
  28. // rect ,circle ,ellipse ,line ,polygon ,polyline ,path
  29. public string Type { get; set; }
  30. public string Style { get; set; }
  31. public string Stroke { get; set; }
  32. //描边的不透明度
  33. // public string StrokeOpacity { get; set; } = "1";
  34. public string StrokeWidth { get; set; }
  35. // 虚线类型描边
  36. public string StrokeDasharray { get; set; }
  37. public string Fill { get; set; }
  38. public string Transform { get; set; }
  39. public string MarkerStart { get; set; }
  40. public string MarkerEnd { get; set; }
  41. //填充色的不透明度
  42. // public string FillOpacity { get; set; } = "1";
  43. }
  44. public class Rect : SvgShape
  45. {
  46. //矩形左上角的x位置
  47. public string X { get; set; }
  48. //矩形左上角的y位置
  49. public string Y { get; set; }
  50. //矩形的宽度
  51. public string Width { get; set; }
  52. //矩形的高度
  53. public string Height { get; set; }
  54. // 圆角的x方位的半径
  55. public string Rx { get; set; }
  56. // 圆角的y方位的半径
  57. public string Ry { get; set; }
  58. }
  59. public class Circle : SvgShape
  60. {
  61. //圆的半径
  62. public string R { get; set; }
  63. //圆心的x位置
  64. public string Cx { get; set; }
  65. //圆心的y位置
  66. public string Cy { get; set; }
  67. }
  68. public class Ellipse : SvgShape
  69. {
  70. // 椭圆的x方位的半径
  71. public string Rx { get; set; }
  72. // 椭圆的y方位的半径
  73. public string Ry { get; set; }
  74. //椭圆的x位置
  75. public string Cx { get; set; }
  76. //椭圆的y位置
  77. public string Cy { get; set; }
  78. }
  79. public class Line : SvgShape
  80. {
  81. //起点的x位置
  82. public string X1 { get; set; }
  83. //起点的Y位置
  84. public string Y1 { get; set; }
  85. //终点的X位置
  86. public string X2 { get; set; }
  87. //终点的Y位置
  88. public string Y2 { get; set; }
  89. }
  90. public class Polyline : SvgShape
  91. {
  92. /// <summary>
  93. /// 点集数列。每个数字用空白、逗号、终止命令符或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。
  94. /// </summary>
  95. public string Points { get; set; }
  96. }
  97. public class Polygon : SvgShape
  98. {
  99. /// <summary>
  100. /// 点集数列。每个数字用空白符、逗号、终止命令或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。
  101. /// 所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。路径绘制完后闭合图形,所以最终的直线将从位置(2,2)连接到位置(0,0)。
  102. /// </summary>
  103. public string Points { get; set; }
  104. }
  105. public class SvgPath : SvgShape
  106. {
  107. public string D { get; set; }
  108. }
  109. public class ShapeGuide
  110. {
  111. public string Name { get; set; }
  112. public string Fmla { get; set; }
  113. }
  114. }