Shape.cs 3.8 KB

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