Paragraph.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. /// <summary>
  56. /// 垂直方向
  57. /// </summary>
  58. public string vert { get; set; }
  59. /// <summary>
  60. /// 水平方向
  61. /// //ctr, l, r, just, dist, thai, justLow thaiDist
  62. /// </summary>
  63. // public string LeftMargin { get; set; }
  64. public string hori { get; set; }
  65. /// <summary>
  66. ///
  67. /// 摘要:
  68. /// Vertical Text Type Enum ( Horizontal ).
  69. /// When the item is serialized out as xml, its value is "horz".
  70. ///Horizontal = 0,
  71. ///
  72. /// 摘要:
  73. /// Vertical Text Type Enum ( Vertical ).
  74. /// When the item is serialized out as xml, its value is "vert".
  75. /// Vertical = 1,
  76. ///
  77. /// 摘要:
  78. /// Vertical Text Type Enum ( Vertical 270 ).
  79. /// When the item is serialized out as xml, its value is "vert270".
  80. /// Vertical270 = 2,
  81. ///
  82. /// 摘要:
  83. /// Vertical Text Type Enum ( WordArt Vertical ).
  84. /// When the item is serialized out as xml, its value is "wordArtVert".
  85. /// WordArtVertical = 3,
  86. ///
  87. /// 摘要:
  88. /// Vertical Text Type Enum ( East Asian Vertical ).
  89. /// When the item is serialized out as xml, its value is "eaVert".
  90. ///EastAsianVetical = 4,
  91. ///
  92. /// 摘要:
  93. /// Vertical Text Type Enum ( Mongolian Vertical ).
  94. /// When the item is serialized out as xml, its value is "mongolianVert".
  95. /// MongolianVertical = 5,
  96. ///
  97. /// 摘要:
  98. /// Vertical WordArt Right to Left.
  99. /// When the item is serialized out as xml, its value is "wordArtVertRtl".
  100. /// WordArtLeftToRight = 6
  101. /// </summary>
  102. public string writing { get; set; }
  103. public Position position { get; set; } = new Position();
  104. //public double newTop { get; set; }
  105. }
  106. }