modes.py 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. """
  2. This module defines available modes for use with TEXT files
  3. (:class:`alphasign.text.Text`).
  4. The following display modes are defined:
  5. * :const:`ROTATE`
  6. * :const:`HOLD`
  7. * :const:`ROLL_UP`
  8. * :const:`ROLL_DOWN`
  9. * :const:`ROLL_LEFT`
  10. * :const:`ROLL_RIGHT`
  11. * :const:`WIPE_UP`
  12. * :const:`WIPE_DOWN`
  13. * :const:`WIPE_LEFT`
  14. * :const:`WIPE_RIGHT`
  15. * :const:`SCROLL`
  16. * :const:`AUTOMODE`
  17. * :const:`ROLL_IN`
  18. * :const:`ROLL_OUT`
  19. * :const:`WIPE_IN`
  20. * :const:`WIPE_OUT`
  21. * :const:`COMPRESSED_ROTATE` (works only on certain sign models)
  22. * :const:`EXPLODE` (Alpha 3.0 protocol only)
  23. * :const:`CLOCK` (Alpha 3.0 protocol only)
  24. The following special modes are defined:
  25. * :const:`TWINKLE`
  26. * :const:`SPARKLE`
  27. * :const:`SNOW`
  28. * :const:`INTERLOCK`
  29. * :const:`SWITCH`
  30. * :const:`SLIDE` (only Betabrite 1036)
  31. * :const:`SPRAY`
  32. * :const:`STARBURST`
  33. * :const:`WELCOME`
  34. * :const:`SLOT_MACHINE`
  35. * :const:`NEWS_FLASH` (only Betabrite 1036)
  36. * :const:`TRUMPET_ANIMATION` (only Betabrite (1036)
  37. * :const:`CYCLE_COLORS` (only AlphaEclipse 3600)
  38. Special graphics are modes which display graphics before the message. The
  39. following special graphics are defined:
  40. * :const:`THANK_YOU`
  41. * :const:`NO_SMOKING`
  42. * :const:`DONT_DRINK_DRIVE`
  43. * :const:`RUNNING_ANIMAL`
  44. * :const:`FISH_ANIMATION`
  45. * :const:`FIREWORKS`
  46. * :const:`TURBO_CAR`
  47. * :const:`BALLOON_ANIMATION`
  48. * :const:`CHERRY_BOMB`
  49. --------
  50. Examples
  51. --------
  52. Make a text file stationary on the sign::
  53. msg = alphasign.Text("hello world", label="A", mode=alphasign.modes.HOLD)
  54. To change the mode for an already created text file, do::
  55. msg.mode = alphasign.modes.ROLL_IN
  56. """
  57. # Normal display modes
  58. ROTATE = "a"
  59. HOLD = "b"
  60. FLASH = "c"
  61. ROLL_UP = "e"
  62. ROLL_DOWN = "f"
  63. ROLL_LEFT = "g"
  64. ROLL_RIGHT = "h"
  65. WIPE_UP = "i"
  66. WIPE_DOWN = "j"
  67. WIPE_LEFT = "k"
  68. WIPE_RIGHT = "l"
  69. SCROLL = "m"
  70. AUTOMODE = "o"
  71. ROLL_IN = "p"
  72. ROLL_OUT = "q"
  73. WIPE_IN = "r"
  74. WIPE_OUT = "s"
  75. COMPRESSED_ROTATE = "t"
  76. EXPLODE = "u"
  77. CLOCK = "v"
  78. # Special modes
  79. TWINKLE = "n0"
  80. SPARKLE = "n1"
  81. SNOW = "n2"
  82. INTERLOCK = "n3"
  83. SWITCH = "n4"
  84. SLIDE = "n5"
  85. SPRAY = "n6"
  86. STARBURST = "n7"
  87. WELCOME = "n8"
  88. SLOT_MACHINE = "n9"
  89. NEWS_FLASH = "nA"
  90. TRUMPET_ANIMATION = "nB"
  91. CYCLE_COLORS = "nC"
  92. # Special graphics
  93. THANK_YOU = "nS"
  94. NO_SMOKING = "nU"
  95. DONT_DRINK_DRIVE = "nV"
  96. RUNNING_ANIMAL = "nW"
  97. FISH_ANIMATION = "nW"
  98. FIREWORKS = "nX"
  99. TURBO_CAR = "nY"
  100. BALLOON_ANIMATION = "nY"
  101. CHERRY_BOMB = "nZ"