Fill.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace HTEXLib
  5. {
  6. public class Fill
  7. {
  8. public Fill() {
  9. grad = new List<string>();
  10. }
  11. /// <summary>
  12. /// [a:noFill, solidFill, gradFill, blipFill, pattFill, grpFill]
  13. ///0,无填充 1.纯色填充 2.渐变填充 3.图片或纹理填充 4.图案填充
  14. /// </summary>
  15. public int type { get; set; }
  16. public string color { get; set; }
  17. public string image { get; set; }
  18. public FillStyle style { get; set; }
  19. //[Newtonsoft.Json.JsonIgnore]
  20. //[System.Text.Json.Serialization.JsonIgnore]
  21. //public string SvgText { get; set; }
  22. //[Newtonsoft.Json.JsonIgnore]
  23. //[System.Text.Json.Serialization.JsonIgnore]
  24. //public string HtmlText { get; set; }
  25. //渐变填充投射方向
  26. public double rot { get; set; }
  27. //渐变填充 以及前景色 背景色 的图案填充 颜色列表
  28. public List<string> grad { get; set; }
  29. /// <summary>
  30. /// 图案填充的内置图形 ltDnDiag 等 48种内置图案
  31. /// </summary>
  32. public string patt { get; set; }
  33. /// <summary>
  34. /// 不透明度
  35. /// </summary>
  36. public double opacity { get; set; }
  37. }
  38. /// <summary>
  39. /// 填充图片偏移量px
  40. /// </summary>
  41. public class FillStyle {
  42. public int left { get; set; } = 0;
  43. public int top { get; set; } = 0;
  44. public int right { get; set; } = 0;
  45. public int bottom { get; set; } = 0;
  46. }
  47. }