old_sql 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. data/README.md +24 -13
  2. data/app/controllers/old_sql/report_controller.rb +3 -17
  3. data/app/views/layouts/old_sql/chart.html.erb +11 -0
  4. data/app/views/old_sql/report/chart.html.erb +8 -25
  5. data/lib/generators/old_sql/templates/user_design_template.csv +2 -3
  6. data/lib/generators/old_sql/templates/user_old_sql_demo_chart_design.yml +18 -9
  7. data/lib/old_sql/report_design/chart.rb +2 -2
  8. data/lib/old_sql/report_design/chart_item.rb +4 -4
  9. data/lib/old_sql/report_design/chart_parser.rb +2 -2
  10. data/public/javascripts/old_sql/chart.js +33 -0
  11. metadata +5 -265
  12. data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +0 -362
  13. data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +0 -69
  14. data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +0 -179
  15. data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +0 -17
  16. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +0 -814
  17. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +0 -1703
  18. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +0 -755
  19. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +0 -1197
  20. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +0 -168
  21. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +0 -187
  22. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +0 -300
  23. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +0 -524
  24. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +0 -420
  25. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +0 -142
  26. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +0 -38
  27. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +0 -240
  28. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +0 -508
  29. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +0 -244
  30. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +0 -385
  31. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +0 -384
  32. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +0 -1161
  33. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +0 -447
  34. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +0 -113
  35. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +0 -767
  36. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +0 -1445
  37. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +0 -651
  38. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +0 -1143
  39. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +0 -145
  40. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +0 -197
  41. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +0 -258
  42. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +0 -454
  43. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +0 -348
  44. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +0 -128
  45. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +0 -26
  46. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +0 -203
  47. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +0 -498
  48. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +0 -186
  49. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +0 -353
  50. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +0 -362
  51. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +0 -895
  52. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +0 -83
  53. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +0 -69
  54. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +0 -401
  55. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +0 -10
  56. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +0 -40
  57. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +0 -96
  58. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +0 -4
  59. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +0 -95
  60. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +0 -31
  61. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +0 -23
  62. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
  63. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
  64. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +0 -54
  65. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +0 -150
  66. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +0 -42
  67. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +0 -90
  68. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +0 -29
  69. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +0 -38
  70. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +0 -189
  71. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +0 -28
  72. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +0 -73
  73. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +0 -38
  74. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +0 -36
  75. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +0 -65
  76. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +0 -31
  77. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +0 -18
  78. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +0 -61
  79. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +0 -38
  80. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +0 -67
  81. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +0 -67
  82. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +0 -30
  83. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +0 -483
  84. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +0 -62
  85. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +0 -71
  86. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
  87. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +0 -150
  88. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +0 -88
  89. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +0 -54
  90. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +0 -373
  91. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +0 -78
  92. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +0 -5
  93. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +0 -85
  94. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +0 -46
  95. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +0 -78
  96. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +0 -11
  97. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +0 -74
  98. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +0 -73
  99. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +0 -125
  100. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +0 -88
  101. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +0 -17
  102. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +0 -59
  103. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +0 -28
  104. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +0 -3
  105. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +0 -19
  106. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +0 -45
  107. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +0 -119
  108. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +0 -40
  109. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +0 -43
  110. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +0 -91
  111. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +0 -54
  112. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +0 -93
  113. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +0 -64
  114. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +0 -71
  115. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +0 -66
  116. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +0 -203
  117. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +0 -177
  118. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +0 -339
  119. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +0 -30
  120. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +0 -31
  121. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +0 -22
  122. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +0 -23
  123. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +0 -71
  124. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +0 -40
  125. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +0 -29
  126. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +0 -61
  127. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +0 -622
  128. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +0 -1
  129. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +0 -19
  130. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +0 -70
  131. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
  132. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
  133. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
  134. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +0 -130
  135. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +0 -48
  136. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +0 -682
  137. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +0 -1489
  138. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +0 -863
  139. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +0 -1256
  140. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +0 -222
  141. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +0 -793
  142. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +0 -304
  143. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +0 -844
  144. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +0 -315
  145. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +0 -353
  146. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +0 -188
  147. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +0 -115
  148. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +0 -236
  149. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +0 -415
  150. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +0 -897
  151. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +0 -589
  152. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +0 -594
  153. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +0 -162
  154. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +0 -2026
  155. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +0 -18
  156. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +0 -7829
  157. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +0 -6
  158. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +0 -251
  159. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +0 -40
  160. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +0 -381
  161. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +0 -159
  162. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +0 -28
  163. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +0 -6
  164. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +0 -25
  165. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +0 -16
  166. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +0 -577
  167. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +0 -137
  168. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +0 -52
  169. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +0 -30
  170. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +0 -89
  171. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +0 -186
  172. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +0 -88
  173. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +0 -408
  174. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +0 -1
  175. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +0 -34
  176. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +0 -84
  177. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +0 -48
  178. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +0 -363
  179. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +0 -39
  180. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +0 -54
  181. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +0 -39
  182. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +0 -38
  183. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +0 -32
  184. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +0 -40
  185. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +0 -18
  186. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +0 -295
  187. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +0 -43
  188. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +0 -223
  189. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +0 -197
  190. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +0 -481
  191. data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +0 -28
  192. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +0 -406
  193. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +0 -683
  194. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +0 -161
  195. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +0 -756
  196. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +0 -151
  197. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +0 -2177
  198. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +0 -705
  199. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +0 -348
  200. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +0 -247
  201. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +0 -9
  202. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +0 -723
  203. data/public/javascripts/old_sql/plotkit-0.9.1/README +0 -1
  204. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +0 -2
  205. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +0 -2
  206. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +0 -302
  207. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +0 -139
  208. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +0 -172
  209. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +0 -81
  210. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +0 -155
  211. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +0 -50
  212. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +0 -428
  213. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +0 -330
  214. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +0 -368
  215. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +0 -256
  216. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +0 -436
  217. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +0 -299
  218. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +0 -159
  219. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +0 -64
  220. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +0 -131
  221. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +0 -34
  222. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +0 -131
  223. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +0 -34
  224. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +0 -334
  225. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +0 -151
  226. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +0 -304
  227. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +0 -144
  228. data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
  229. data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
  230. data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
  231. data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
  232. data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +0 -62
  233. data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +0 -37
  234. data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
  235. data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
  236. data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
  237. data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
  238. data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
  239. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
  240. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +0 -58
  241. data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +0 -31
  242. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +0 -25
  243. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +0 -143
  244. data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +0 -56
  245. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +0 -58
  246. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +0 -133
  247. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +0 -57
  248. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +0 -136
  249. data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +0 -161
  250. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
  251. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
  252. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
  253. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
  254. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
  255. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
  256. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +0 -38
  257. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +0 -43
  258. data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +0 -28
  259. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +0 -29
  260. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +0 -53
  261. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +0 -29
  262. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +0 -61
  263. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +0 -57
  264. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +0 -6
  265. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +0 -29
  266. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +0 -141
  267. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +0 -26
  268. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +0 -147
  269. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +0 -24
  270. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +0 -89
  271. data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +0 -66
  272. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +0 -20
  273. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +0 -31
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://web.resource.org/cc/"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:xlink="http://www.w3.org/1999/xlink">
9
- </svg>
@@ -1,723 +0,0 @@
1
- // Copyright 2006 Google Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- // TODO: Patterns
16
- // TODO: Radial gradient
17
- // TODO: Clipping paths
18
- // TODO: Coordsize (still need to support stretching)
19
- // TODO: Painting mode
20
- // TODO: Optimize
21
- // TODO: canvas width/height sets content size in moz, border size in ie
22
-
23
- // only add this code if we do not already have a canvas implementation
24
- if (!window.CanvasRenderingContext2D) {
25
-
26
- (function () {
27
-
28
- // alias some functions to make (compiled) code shorter
29
- var m = Math;
30
- var mr = m.round;
31
- var ms = m.sin;
32
- var mc = m.cos;
33
-
34
- var G_vmlCanvasManager_ = {
35
- init: function (opt_doc) {
36
- var doc = opt_doc || document;
37
- if (/MSIE/.test(navigator.userAgent) && !window.opera) {
38
- var self = this;
39
- doc.attachEvent("onreadystatechange", function () {
40
- self.init_(doc);
41
- });
42
- }
43
- },
44
-
45
- init_: function (doc, e) {
46
- if (doc.readyState == "complete") {
47
- // create xmlns
48
- if (!doc.namespaces["g_vml_"]) {
49
- doc.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml");
50
- }
51
-
52
- // setup default css
53
- var ss = doc.createStyleSheet();
54
- ss.cssText = "canvas{display:inline-block;overflow:hidden;" +
55
- "text-align:left;}" +
56
- "g_vml_\\:*{behavior:url(#default#VML)}";
57
-
58
- // find all canvas elements
59
- var els = doc.getElementsByTagName("canvas");
60
- for (var i = 0; i < els.length; i++) {
61
- if (!els[i].getContext) {
62
- this.initElement(els[i]);
63
- }
64
- }
65
- }
66
- },
67
-
68
- fixElement_: function (el) {
69
- // in IE before version 5.5 we would need to add HTML: to the tag name
70
- // but we do not care about IE before version 6
71
- var outerHTML = el.outerHTML;
72
- var newEl = document.createElement(outerHTML);
73
- // if the tag is still open IE has created the children as siblings and
74
- // it has also created a tag with the name "/FOO"
75
- if (outerHTML.slice(-2) != "/>") {
76
- var tagName = "/" + el.tagName;
77
- var ns;
78
- // remove content
79
- while ((ns = el.nextSibling) && ns.tagName != tagName) {
80
- ns.removeNode();
81
- }
82
- // remove the incorrect closing tag
83
- if (ns) {
84
- ns.removeNode();
85
- }
86
- }
87
- el.parentNode.replaceChild(newEl, el);
88
- return newEl;
89
- },
90
-
91
- /**
92
- * Public initializes a canvas element so that it can be used as canvas
93
- * element from now on. This is called automatically before the page is
94
- * loaded but if you are creating elements using createElement you need to
95
- * make sure this is called on the element.
96
- * @param {HTMLElement} el The canvas element to initialize.
97
- * @return {HTMLElement} the element that was created.
98
- */
99
- initElement: function (el) {
100
- el = this.fixElement_(el);
101
- el.getContext = function () {
102
- if (this.context_) {
103
- return this.context_;
104
- }
105
- return this.context_ = new CanvasRenderingContext2D_(this);
106
- };
107
-
108
- // do not use inline function because that will leak memory
109
- // el.attachEvent('onpropertychange', onPropertyChange)
110
- el.attachEvent('onresize', onResize);
111
-
112
- var attrs = el.attributes;
113
- if (attrs.width && attrs.width.specified) {
114
- // TODO: use runtimeStyle and coordsize
115
- // el.getContext().setWidth_(attrs.width.nodeValue);
116
- el.style.width = attrs.width.nodeValue + "px";
117
- }
118
- if (attrs.height && attrs.height.specified) {
119
- // TODO: use runtimeStyle and coordsize
120
- // el.getContext().setHeight_(attrs.height.nodeValue);
121
- el.style.height = attrs.height.nodeValue + "px";
122
- }
123
- //el.getContext().setCoordsize_()
124
- return el;
125
- }
126
- };
127
-
128
- function onPropertyChange(e) {
129
- // we need to watch changes to width and height
130
- switch (e.propertyName) {
131
- case 'width':
132
- case 'height':
133
- // TODO: coordsize and size
134
- break;
135
- }
136
- }
137
-
138
- function onResize(e) {
139
- var el = e.srcElement;
140
- if (el.firstChild) {
141
- el.firstChild.style.width = el.clientWidth + 'px';
142
- el.firstChild.style.height = el.clientHeight + 'px';
143
- }
144
- }
145
-
146
- G_vmlCanvasManager_.init();
147
-
148
- // precompute "00" to "FF"
149
- var dec2hex = [];
150
- for (var i = 0; i < 16; i++) {
151
- for (var j = 0; j < 16; j++) {
152
- dec2hex[i * 16 + j] = i.toString(16) + j.toString(16);
153
- }
154
- }
155
-
156
- function createMatrixIdentity() {
157
- return [
158
- [1, 0, 0],
159
- [0, 1, 0],
160
- [0, 0, 1]
161
- ];
162
- }
163
-
164
- function matrixMultiply(m1, m2) {
165
- var result = createMatrixIdentity();
166
-
167
- for (var x = 0; x < 3; x++) {
168
- for (var y = 0; y < 3; y++) {
169
- var sum = 0;
170
-
171
- for (var z = 0; z < 3; z++) {
172
- sum += m1[x][z] * m2[z][y];
173
- }
174
-
175
- result[x][y] = sum;
176
- }
177
- }
178
- return result;
179
- }
180
-
181
- function copyState(o1, o2) {
182
- o2.fillStyle = o1.fillStyle;
183
- o2.lineCap = o1.lineCap;
184
- o2.lineJoin = o1.lineJoin;
185
- o2.lineWidth = o1.lineWidth;
186
- o2.miterLimit = o1.miterLimit;
187
- o2.shadowBlur = o1.shadowBlur;
188
- o2.shadowColor = o1.shadowColor;
189
- o2.shadowOffsetX = o1.shadowOffsetX;
190
- o2.shadowOffsetY = o1.shadowOffsetY;
191
- o2.strokeStyle = o1.strokeStyle;
192
- }
193
-
194
- function processStyle(styleString) {
195
- var str, alpha = 1;
196
-
197
- styleString = String(styleString);
198
- if (styleString.substring(0, 3) == "rgb") {
199
- var start = styleString.indexOf("(", 3);
200
- var end = styleString.indexOf(")", start + 1);
201
- var guts = styleString.substring(start + 1, end).split(",");
202
-
203
- str = "#";
204
- for (var i = 0; i < 3; i++) {
205
- str += dec2hex[parseInt(guts[i])];
206
- }
207
-
208
- if ((guts.length == 4) && (styleString.substr(3, 1) == "a")) {
209
- alpha = guts[3];
210
- }
211
- } else {
212
- str = styleString;
213
- }
214
-
215
- return [str, alpha];
216
- }
217
-
218
- function processLineCap(lineCap) {
219
- switch (lineCap) {
220
- case "butt":
221
- return "flat";
222
- case "round":
223
- return "round";
224
- case "square":
225
- default:
226
- return "square";
227
- }
228
- }
229
-
230
- /**
231
- * This class implements CanvasRenderingContext2D interface as described by
232
- * the WHATWG.
233
- * @param {HTMLElement} surfaceElement The element that the 2D context should
234
- * be associated with
235
- */
236
- function CanvasRenderingContext2D_(surfaceElement) {
237
- this.m_ = createMatrixIdentity();
238
-
239
- this.mStack_ = [];
240
- this.aStack_ = [];
241
- this.currentPath_ = [];
242
-
243
- // Canvas context properties
244
- this.strokeStyle = "#000";
245
- this.fillStyle = "#ccc";
246
-
247
- this.lineWidth = 1;
248
- this.lineJoin = "miter";
249
- this.lineCap = "butt";
250
- this.miterLimit = 10;
251
- this.globalAlpha = 1;
252
-
253
- var el = document.createElement('div');
254
- el.style.width = surfaceElement.clientWidth + 'px';
255
- el.style.height = surfaceElement.clientHeight + 'px';
256
- el.style.overflow = 'hidden';
257
- el.style.position = 'absolute';
258
- surfaceElement.appendChild(el);
259
-
260
- this.element_ = el;
261
- this.arcScaleX_ = 1;
262
- this.arcScaleY_ = 1;
263
- };
264
-
265
- var contextPrototype = CanvasRenderingContext2D_.prototype;
266
- contextPrototype.clearRect = function() {
267
- this.element_.innerHTML = "";
268
- this.currentPath_ = [];
269
- };
270
-
271
- contextPrototype.beginPath = function() {
272
- // TODO: Branch current matrix so that save/restore has no effect
273
- // as per safari docs.
274
-
275
- this.currentPath_ = [];
276
- };
277
-
278
- contextPrototype.moveTo = function(aX, aY) {
279
- this.currentPath_.push({type: "moveTo", x: aX, y: aY});
280
- };
281
-
282
- contextPrototype.lineTo = function(aX, aY) {
283
- this.currentPath_.push({type: "lineTo", x: aX, y: aY});
284
- };
285
-
286
- contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
287
- aCP2x, aCP2y,
288
- aX, aY) {
289
- this.currentPath_.push({type: "bezierCurveTo",
290
- cp1x: aCP1x,
291
- cp1y: aCP1y,
292
- cp2x: aCP2x,
293
- cp2y: aCP2y,
294
- x: aX,
295
- y: aY});
296
- };
297
-
298
- contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
299
- // VML's qb produces different output to Firefox's
300
- // FF's behaviour seems to have changed in 1.5.0.1, check this
301
- this.bezierCurveTo(aCPx, aCPy, aCPx, aCPy, aX, aY);
302
- };
303
-
304
- contextPrototype.arc = function(aX, aY, aRadius,
305
- aStartAngle, aEndAngle, aClockwise) {
306
- aRadius *= 10;
307
- var arcType = aClockwise ? "at" : "wa";
308
-
309
- var xStart = aX + (mc(aStartAngle) * aRadius) - 5;
310
- var yStart = aY + (ms(aStartAngle) * aRadius) - 5;
311
-
312
- var xEnd = aX + (mc(aEndAngle) * aRadius) - 5;
313
- var yEnd = aY + (ms(aEndAngle) * aRadius) - 5;
314
-
315
- this.currentPath_.push({type: arcType,
316
- x: aX,
317
- y: aY,
318
- radius: aRadius,
319
- xStart: xStart,
320
- yStart: yStart,
321
- xEnd: xEnd,
322
- yEnd: yEnd});
323
-
324
- };
325
-
326
- contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
327
- this.moveTo(aX, aY);
328
- this.lineTo(aX + aWidth, aY);
329
- this.lineTo(aX + aWidth, aY + aHeight);
330
- this.lineTo(aX, aY + aHeight);
331
- this.closePath();
332
- };
333
-
334
- contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
335
- // Will destroy any existing path (same as FF behaviour)
336
- this.beginPath();
337
- this.moveTo(aX, aY);
338
- this.lineTo(aX + aWidth, aY);
339
- this.lineTo(aX + aWidth, aY + aHeight);
340
- this.lineTo(aX, aY + aHeight);
341
- this.closePath();
342
- this.stroke();
343
- };
344
-
345
- contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
346
- // Will destroy any existing path (same as FF behaviour)
347
- this.beginPath();
348
- this.moveTo(aX, aY);
349
- this.lineTo(aX + aWidth, aY);
350
- this.lineTo(aX + aWidth, aY + aHeight);
351
- this.lineTo(aX, aY + aHeight);
352
- this.closePath();
353
- this.fill();
354
- };
355
-
356
- contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
357
- var gradient = new CanvasGradient_("gradient");
358
- return gradient;
359
- };
360
-
361
- contextPrototype.createRadialGradient = function(aX0, aY0,
362
- aR0, aX1,
363
- aY1, aR1) {
364
- var gradient = new CanvasGradient_("gradientradial");
365
- gradient.radius1_ = aR0;
366
- gradient.radius2_ = aR1;
367
- gradient.focus_.x = aX0;
368
- gradient.focus_.y = aY0;
369
- return gradient;
370
- };
371
-
372
- contextPrototype.drawImage = function (image, var_args) {
373
- var dx, dy, dw, dh, sx, sy, sw, sh;
374
- var w = image.width;
375
- var h = image.height;
376
-
377
- if (arguments.length == 3) {
378
- dx = arguments[1];
379
- dy = arguments[2];
380
- sx = sy = 0;
381
- sw = dw = w;
382
- sh = dh = h;
383
- } else if (arguments.length == 5) {
384
- dx = arguments[1];
385
- dy = arguments[2];
386
- dw = arguments[3];
387
- dh = arguments[4];
388
- sx = sy = 0;
389
- sw = w;
390
- sh = h;
391
- } else if (arguments.length == 9) {
392
- sx = arguments[1];
393
- sy = arguments[2];
394
- sw = arguments[3];
395
- sh = arguments[4];
396
- dx = arguments[5];
397
- dy = arguments[6];
398
- dw = arguments[7];
399
- dh = arguments[8];
400
- } else {
401
- throw "Invalid number of arguments";
402
- }
403
-
404
- var d = this.getCoords_(dx, dy);
405
-
406
- var w2 = (sw / 2);
407
- var h2 = (sh / 2);
408
-
409
- var vmlStr = [];
410
-
411
- // For some reason that I've now forgotten, using divs didn't work
412
- vmlStr.push(' <g_vml_:group',
413
- ' coordsize="1000,1000"',
414
- ' coordorigin="0, 0"' ,
415
- ' style="width:100px;height:100px;position:absolute;');
416
-
417
- // If filters are necessary (rotation exists), create them
418
- // filters are bog-slow, so only create them if abbsolutely necessary
419
- // The following check doesn't account for skews (which don't exist
420
- // in the canvas spec (yet) anyway.
421
-
422
- if (this.m_[0][0] != 1 || this.m_[0][1]) {
423
- var filter = [];
424
-
425
- // Note the 12/21 reversal
426
- filter.push("M11='", this.m_[0][0], "',",
427
- "M12='", this.m_[1][0], "',",
428
- "M21='", this.m_[0][1], "',",
429
- "M22='", this.m_[1][1], "',",
430
- "Dx='", d.x, "',",
431
- "Dy='", d.y, "'");
432
-
433
- // Bounding box calculation (need to minimize displayed area so that
434
- // filters don't waste time on unused pixels.
435
- var max = d;
436
- var c2 = this.getCoords_(dx+dw, dy);
437
- var c3 = this.getCoords_(dx, dy+dh);
438
- var c4 = this.getCoords_(dx+dw, dy+dh);
439
-
440
- max.x = Math.max(max.x, c2.x, c3.x, c4.x);
441
- max.y = Math.max(max.y, c2.y, c3.y, c4.y);
442
-
443
- vmlStr.push(" padding:0 ", mr(max.x), "px ", mr(max.y),
444
- "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",
445
- filter.join(""), ", sizingmethod='clip');")
446
- } else {
447
- vmlStr.push(" top:", d.y, "px;left:", d.x, "px;")
448
- }
449
-
450
- vmlStr.push(' ">' ,
451
- '<g_vml_:image src="', image.src, '"',
452
- ' style="width:', dw, ';',
453
- ' height:', dh, ';"',
454
- ' cropleft="', sx / w, '"',
455
- ' croptop="', sy / h, '"',
456
- ' cropright="', (w - sx - sw) / w, '"',
457
- ' cropbottom="', (h - sy - sh) / h, '"',
458
- ' />',
459
- '</g_vml_:group>');
460
-
461
- this.element_.insertAdjacentHTML("BeforeEnd",
462
- vmlStr.join(""));
463
- };
464
-
465
- contextPrototype.stroke = function(aFill) {
466
- var lineStr = [];
467
- var lineOpen = false;
468
- var a = processStyle(aFill ? this.fillStyle : this.strokeStyle);
469
- var color = a[0];
470
- var opacity = a[1] * this.globalAlpha;
471
-
472
- lineStr.push('<g_vml_:shape',
473
- ' fillcolor="', color, '"',
474
- ' filled="', Boolean(aFill), '"',
475
- ' style="position:absolute;width:10;height:10;"',
476
- ' coordorigin="0 0" coordsize="100 100"',
477
- ' stroked="', !aFill, '"',
478
- ' strokeweight="', this.lineWidth, '"',
479
- ' strokecolor="', color, '"',
480
- ' path="');
481
-
482
- var newSeq = false;
483
- var min = {x: null, y: null};
484
- var max = {x: null, y: null};
485
-
486
- for (var i = 0; i < this.currentPath_.length; i++) {
487
- var p = this.currentPath_[i];
488
-
489
- if (p.type == "moveTo") {
490
- lineStr.push(" m ");
491
- var c = this.getCoords_(p.x, p.y);
492
- lineStr.push(mr(c.x), ",", mr(c.y));
493
- } else if (p.type == "lineTo") {
494
- lineStr.push(" l ");
495
- var c = this.getCoords_(p.x, p.y);
496
- lineStr.push(mr(c.x), ",", mr(c.y));
497
- } else if (p.type == "close") {
498
- lineStr.push(" x ");
499
- } else if (p.type == "bezierCurveTo") {
500
- lineStr.push(" c ");
501
- var c = this.getCoords_(p.x, p.y);
502
- var c1 = this.getCoords_(p.cp1x, p.cp1y);
503
- var c2 = this.getCoords_(p.cp2x, p.cp2y);
504
- lineStr.push(mr(c1.x), ",", mr(c1.y), ",",
505
- mr(c2.x), ",", mr(c2.y), ",",
506
- mr(c.x), ",", mr(c.y));
507
- } else if (p.type == "at" || p.type == "wa") {
508
- lineStr.push(" ", p.type, " ");
509
- var c = this.getCoords_(p.x, p.y);
510
- var cStart = this.getCoords_(p.xStart, p.yStart);
511
- var cEnd = this.getCoords_(p.xEnd, p.yEnd);
512
-
513
- lineStr.push(mr(c.x - this.arcScaleX_ * p.radius), ",",
514
- mr(c.y - this.arcScaleY_ * p.radius), " ",
515
- mr(c.x + this.arcScaleX_ * p.radius), ",",
516
- mr(c.y + this.arcScaleY_ * p.radius), " ",
517
- mr(cStart.x), ",", mr(cStart.y), " ",
518
- mr(cEnd.x), ",", mr(cEnd.y));
519
- }
520
-
521
-
522
- // TODO: Following is broken for curves due to
523
- // move to proper paths.
524
-
525
- // Figure out dimensions so we can do gradient fills
526
- // properly
527
- if(c) {
528
- if (min.x == null || c.x < min.x) {
529
- min.x = c.x;
530
- }
531
- if (max.x == null || c.x > max.x) {
532
- max.x = c.x;
533
- }
534
- if (min.y == null || c.y < min.y) {
535
- min.y = c.y;
536
- }
537
- if (max.y == null || c.y > max.y) {
538
- max.y = c.y;
539
- }
540
- }
541
- }
542
- lineStr.push(' ">');
543
-
544
- if (typeof this.fillStyle == "object") {
545
- var focus = {x: "50%", y: "50%"};
546
- var width = (max.x - min.x);
547
- var height = (max.y - min.y);
548
- var dimension = (width > height) ? width : height;
549
-
550
- focus.x = mr((this.fillStyle.focus_.x / width) * 100 + 50) + "%";
551
- focus.y = mr((this.fillStyle.focus_.y / height) * 100 + 50) + "%";
552
-
553
- var colors = [];
554
-
555
- // inside radius (%)
556
- if (this.fillStyle.type_ == "gradientradial") {
557
- var inside = (this.fillStyle.radius1_ / dimension * 100);
558
-
559
- // percentage that outside radius exceeds inside radius
560
- var expansion = (this.fillStyle.radius2_ / dimension * 100) - inside;
561
- } else {
562
- var inside = 0;
563
- var expansion = 100;
564
- }
565
-
566
- var insidecolor = {offset: null, color: null};
567
- var outsidecolor = {offset: null, color: null};
568
-
569
- // We need to sort 'colors' by percentage, from 0 > 100 otherwise ie
570
- // won't interpret it correctly
571
- this.fillStyle.colors_.sort(function (cs1, cs2) {
572
- return cs1.offset - cs2.offset;
573
- });
574
-
575
- for (var i = 0; i < this.fillStyle.colors_.length; i++) {
576
- var fs = this.fillStyle.colors_[i];
577
-
578
- colors.push( (fs.offset * expansion) + inside, "% ", fs.color, ",");
579
-
580
- if (fs.offset > insidecolor.offset || insidecolor.offset == null) {
581
- insidecolor.offset = fs.offset;
582
- insidecolor.color = fs.color;
583
- }
584
-
585
- if (fs.offset < outsidecolor.offset || outsidecolor.offset == null) {
586
- outsidecolor.offset = fs.offset;
587
- outsidecolor.color = fs.color;
588
- }
589
- }
590
- colors.pop();
591
-
592
- lineStr.push('<g_vml_:fill',
593
- ' color="', outsidecolor.color, '"',
594
- ' color2="', insidecolor.color, '"',
595
- ' type="', this.fillStyle.type_, '"',
596
- ' focusposition="', focus.x, ', ', focus.y, '"',
597
- ' colors="', colors.join(""), '"',
598
- ' opacity="', opacity, '" />');
599
- } else if (aFill) {
600
- lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity, '" />');
601
- } else {
602
- lineStr.push(
603
- '<g_vml_:stroke',
604
- ' opacity="', opacity,'"',
605
- ' joinstyle="', this.lineJoin, '"',
606
- ' miterlimit="', this.miterLimit, '"',
607
- ' endcap="', processLineCap(this.lineCap) ,'"',
608
- ' weight="', this.lineWidth, 'px"',
609
- ' color="', color,'" />'
610
- );
611
- }
612
-
613
- lineStr.push("</g_vml_:shape>");
614
-
615
- this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""));
616
-
617
- this.currentPath_ = [];
618
- };
619
-
620
- contextPrototype.fill = function() {
621
- this.stroke(true);
622
- }
623
-
624
- contextPrototype.closePath = function() {
625
- this.currentPath_.push({type: "close"});
626
- };
627
-
628
- /**
629
- * @private
630
- */
631
- contextPrototype.getCoords_ = function(aX, aY) {
632
- return {
633
- x: 10 * (aX * this.m_[0][0] + aY * this.m_[1][0] + this.m_[2][0]) - 5,
634
- y: 10 * (aX * this.m_[0][1] + aY * this.m_[1][1] + this.m_[2][1]) - 5
635
- }
636
- };
637
-
638
- contextPrototype.save = function() {
639
- var o = {};
640
- copyState(this, o);
641
- this.aStack_.push(o);
642
- this.mStack_.push(this.m_);
643
- this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
644
- };
645
-
646
- contextPrototype.restore = function() {
647
- copyState(this.aStack_.pop(), this);
648
- this.m_ = this.mStack_.pop();
649
- };
650
-
651
- contextPrototype.translate = function(aX, aY) {
652
- var m1 = [
653
- [1, 0, 0],
654
- [0, 1, 0],
655
- [aX, aY, 1]
656
- ];
657
-
658
- this.m_ = matrixMultiply(m1, this.m_);
659
- };
660
-
661
- contextPrototype.rotate = function(aRot) {
662
- var c = mc(aRot);
663
- var s = ms(aRot);
664
-
665
- var m1 = [
666
- [c, s, 0],
667
- [-s, c, 0],
668
- [0, 0, 1]
669
- ];
670
-
671
- this.m_ = matrixMultiply(m1, this.m_);
672
- };
673
-
674
- contextPrototype.scale = function(aX, aY) {
675
- this.arcScaleX_ *= aX;
676
- this.arcScaleY_ *= aY;
677
- var m1 = [
678
- [aX, 0, 0],
679
- [0, aY, 0],
680
- [0, 0, 1]
681
- ];
682
-
683
- this.m_ = matrixMultiply(m1, this.m_);
684
- };
685
-
686
- /******** STUBS ********/
687
- contextPrototype.clip = function() {
688
- // TODO: Implement
689
- };
690
-
691
- contextPrototype.arcTo = function() {
692
- // TODO: Implement
693
- };
694
-
695
- contextPrototype.createPattern = function() {
696
- return new CanvasPattern_;
697
- };
698
-
699
- // Gradient / Pattern Stubs
700
- function CanvasGradient_(aType) {
701
- this.type_ = aType;
702
- this.radius1_ = 0;
703
- this.radius2_ = 0;
704
- this.colors_ = [];
705
- this.focus_ = {x: 0, y: 0};
706
- }
707
-
708
- CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
709
- aColor = processStyle(aColor);
710
- this.colors_.push({offset: 1-aOffset, color: aColor});
711
- };
712
-
713
- function CanvasPattern_() {}
714
-
715
- // set up externs
716
- G_vmlCanvasManager = G_vmlCanvasManager_;
717
- CanvasRenderingContext2D = CanvasRenderingContext2D_;
718
- CanvasGradient = CanvasGradient_;
719
- CanvasPattern = CanvasPattern_;
720
-
721
- })();
722
-
723
- } // if