programitems.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package colorlight
  2. type LogFont struct {
  3. LfHeight string `json:"lfHeight"` //Font height in pixels.
  4. LfWeight string `json:"lfWeight"` // 0-1000, 0,Default weight, 700 bold
  5. LfItalic string `json:"lfItalic"` //Italic 0-not italic, 1-italic
  6. LfUnderline string `json:"lfUnderline"` //underline or not.
  7. LfStrikeOut string `json:"lfStrikeOut"` //
  8. LfFaceName string `json:"lfFaceName"` //font name. "default" for english.
  9. }
  10. // 单行文本
  11. type ItemSingleLineText struct {
  12. Type string `json:"Type"` //(DONT change this, 4 – is for single line text item)
  13. TextColor string `json:"TextColor"` // e.g. 0xFF000000
  14. LogFont LogFont `json:"LogFont"`
  15. Text string `json:"Text"` //Text content
  16. IsScroll string `json:"IsScroll"` //Should the text scroll or not (0-not scroll, 1-scroll)
  17. Speed string `json:"Speed"` //pixels per second
  18. IsScrollByTime string `json:"IsScrollByTime"` // 0-use RepeatCount, 1-use PlayLenth
  19. IsHeadConnectTail string `json:"IsHeadConnectTail"` //"0|1",
  20. RepeatCount string `json:"RepeatCount"` //
  21. PlayLenth string `json:"PlayLenth"` //Duration (miliseconds)
  22. }
  23. // 多行文本
  24. type ItemMultiLineText struct {
  25. Type string `json:"Type"` //(DONT change this id, 5-multiline)
  26. TextColor string `json:"TextColor"` // e.g. 0xFF000000
  27. LogFont LogFont `json:"LogFont"`
  28. CenteralAlign string `json:"CenteralAlign"` // Horizontal alignment, 0 – Left alignment, 1 – Center Alignment, 2 – Right alignment.
  29. VerticalAlign string `json:"VerticalAlign"` // Vertical alignment, 0 – Top alignment, 1 – Center Alignment
  30. Text string `json:"Text"` //Text content
  31. IsScroll string `json:"IsScroll"` //Should the text scroll or not (0-not scroll, 1-scroll)
  32. Speed string `json:"Speed"` //pixels per second
  33. IsScrollByTime string `json:"IsScrollByTime"` // 0-use RepeatCount, 1-use PlayLenth
  34. RepeatCount string `json:"RepeatCount"` //
  35. PlayLenth string `json:"PlayLenth"` //Duration (miliseconds)
  36. }
  37. type InEffect struct {
  38. Type string `json:"Type"`
  39. Time string `json:"DateTime"` // Transition duration in milisecond.
  40. }
  41. // 图片
  42. type ItemPicture struct {
  43. Type string `json:"Type"` // (DONT change this, 2-Picture item)
  44. FileSource FileSource `json:"FileSource"`
  45. Duration string `json:"Duration"` // Duration in millisecond, including the inEffect->DateTime.
  46. InEffect InEffect `json:"inEffect"`
  47. ReserveAS string `json:"ReserveAS"` //Keep image aspect ratio.
  48. }
  49. // 视频
  50. type ItemVideo struct {
  51. Type string `json:"Type"` // (DONT change this id. Fixed, 3 – this item is video)
  52. Volume string `json:"Volume"` // Volume(0-1.000000) (* Mandatory)
  53. Duration string `json:"Duration"` // Duration in millisecond
  54. FileSource FileSource `json:"FileSource"`
  55. ReserveAS string `json:"ReserveAS"` //Keep image aspect ratio.
  56. }
  57. // 网页
  58. type ItemWebPage struct {
  59. Type string `json:"Type"` // (DONT change this, 27-WEB page item)
  60. Url string `json:"Url"` //
  61. Rect Rect `json:"Rect"` // Duration in millisecond
  62. }