Paragraph.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. using HTEXLib.Models.HTEX;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace HTEXLib
  6. {
  7. public class Paragraph
  8. {
  9. public Paragraph() {
  10. texts = new List<Text>();
  11. }
  12. /// <summary>
  13. ///
  14. /// </summary>
  15. public ParagraphStyle style { get; set; } = new ParagraphStyle();
  16. /// <summary>
  17. /// 是否有动画
  18. /// </summary>
  19. public bool animatable { get; set; }
  20. public BuChar buChar { get; set; }
  21. public List<Text> texts { get; set; }
  22. /// <summary>
  23. /// 进入场景之前是否可见元素
  24. /// </summary>
  25. public bool invisible { get; set; }
  26. }
  27. public class Text //:Item
  28. {
  29. // public string StyleSha { get; set; }
  30. public string content { get; set; }
  31. public string link { get; set; }
  32. public string linkType { get; set; }
  33. public bool isbr { get; set; } = false;
  34. public FontStyle style { get; set; }
  35. }
  36. public class BuChar {
  37. //TYPE_BULPIC TYPE_NUMERIC TYPE_BULLET TYPE_NONE 没有图标的 只有缩进
  38. public string type{ get; set; }
  39. public double left { get; set; }
  40. // public double riht { get; set; }
  41. public string buchar { get; set; }
  42. public string color { get; set; }
  43. public string typeface { get; set; }
  44. public double size { get; set; }
  45. public string @float { get; set; }
  46. /// <summary>
  47. /// ltr 默认。文本方向从左到右
  48. /// rtl 文本方向从右到左。
  49. /// inherit 规定应该从父元素继承 direction 属性的值。
  50. /// </summary>
  51. public string direction { get; set; } = "inherit";
  52. }
  53. public class ParagraphStyle
  54. {
  55. public string vert { get; set; }
  56. // public string LeftMargin { get; set; }
  57. public string hori { get; set; }
  58. /// <summary>
  59. ///
  60. /// 摘要:
  61. /// Vertical Text Type Enum ( Horizontal ).
  62. /// When the item is serialized out as xml, its value is "horz".
  63. ///Horizontal = 0,
  64. ///
  65. /// 摘要:
  66. /// Vertical Text Type Enum ( Vertical ).
  67. /// When the item is serialized out as xml, its value is "vert".
  68. /// Vertical = 1,
  69. ///
  70. /// 摘要:
  71. /// Vertical Text Type Enum ( Vertical 270 ).
  72. /// When the item is serialized out as xml, its value is "vert270".
  73. /// Vertical270 = 2,
  74. ///
  75. /// 摘要:
  76. /// Vertical Text Type Enum ( WordArt Vertical ).
  77. /// When the item is serialized out as xml, its value is "wordArtVert".
  78. /// WordArtVertical = 3,
  79. ///
  80. /// 摘要:
  81. /// Vertical Text Type Enum ( East Asian Vertical ).
  82. /// When the item is serialized out as xml, its value is "eaVert".
  83. ///EastAsianVetical = 4,
  84. ///
  85. /// 摘要:
  86. /// Vertical Text Type Enum ( Mongolian Vertical ).
  87. /// When the item is serialized out as xml, its value is "mongolianVert".
  88. /// MongolianVertical = 5,
  89. ///
  90. /// 摘要:
  91. /// Vertical WordArt Right to Left.
  92. /// When the item is serialized out as xml, its value is "wordArtVertRtl".
  93. /// WordArtLeftToRight = 6
  94. /// </summary>
  95. public string writing { get; set; }
  96. public Position position { get; set; } = new Position();
  97. public double newTop { get; set; }
  98. }
  99. }