HtexContainer.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace TEAMModelOS.Test.PPTX.PresentationElement
  5. {
  6. public class HtexContainer : HtexPosition
  7. {
  8. public HtexContainer() {
  9. Texts = new List<HtexText>();
  10. Paths = new List<HtexPath>();
  11. }
  12. /// <summary>
  13. /// p:sp
  14. /// </summary>
  15. public string Type { get; set; }
  16. //文字排版 横版 竖版
  17. public string TextLayout { get; set; }
  18. //文字位置
  19. public string TextAlign { get; set; } = "left";
  20. //容器填充颜色
  21. public string FillColor { get; set; }
  22. //图形是否闭合
  23. public bool Close { get; set; } = false;
  24. public List<HtexText> Texts { get; set; }
  25. public List<HtexPath> Paths { get; set; }
  26. }
  27. public abstract class HtexPath
  28. {
  29. public string Type { get; set; }
  30. }
  31. //public abstract class HtexClosePath :HtexPath
  32. //{
  33. // public bool Close { get; set; } = false;
  34. //}
  35. /// <summary>
  36. /// 起点 <a:moveTo>
  37. /// </summary>
  38. public class HtexMoveToPath : HtexPath
  39. {
  40. public HtexMoveToPath()
  41. {
  42. Pts = new List<Point> { };
  43. }
  44. public List<Point> Pts { get; set; }
  45. }
  46. /// <summary>
  47. /// 弧形 <a:arcTo>
  48. /// </summary>
  49. public class HtexArcToPath : HtexPath
  50. {
  51. public string WidthRadius { get; set; }
  52. public string HeightRadius { get; set; }
  53. public string StartAngle { get; set; }
  54. public string SwingAngle { get; set; }
  55. }
  56. /// <summary>
  57. /// 画线 <a:lnTo>
  58. /// </summary>
  59. public class HtexLineToPath : HtexPath
  60. {
  61. public HtexLineToPath()
  62. {
  63. Pts = new List<Point> { };
  64. }
  65. public List<Point> Pts { get; set; }
  66. }
  67. /// <summary>
  68. /// 三次贝塞尔曲线<a:cubicBezTo>
  69. /// </summary>
  70. public class HtexCubicBezPath : HtexPath
  71. {
  72. public HtexCubicBezPath()
  73. {
  74. Pts = new List<Point> { };
  75. }
  76. public List<Point> Pts { get; set; }
  77. }/// <summary>
  78. /// 二次贝塞尔曲线 <a:quadBezTo>
  79. /// </summary>
  80. public class HtexQuadBezPath : HtexPath
  81. {
  82. public HtexQuadBezPath()
  83. {
  84. Pts = new List<Point> { };
  85. }
  86. public List<Point> Pts { get; set; }
  87. }
  88. public class Point{
  89. public int X { get; set; }
  90. public int Y { get; set; }
  91. }
  92. }