old_sql 1.12.0 → 1.13.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 (263) hide show
  1. data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +362 -0
  2. data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +69 -0
  3. data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +179 -0
  4. data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +17 -0
  5. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +814 -0
  6. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +1703 -0
  7. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +755 -0
  8. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +1197 -0
  9. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +168 -0
  10. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +187 -0
  11. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +300 -0
  12. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +524 -0
  13. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +420 -0
  14. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +142 -0
  15. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +38 -0
  16. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +240 -0
  17. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +508 -0
  18. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +244 -0
  19. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +385 -0
  20. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +384 -0
  21. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +1161 -0
  22. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +447 -0
  23. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +113 -0
  24. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +767 -0
  25. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +1445 -0
  26. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +651 -0
  27. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +1143 -0
  28. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +145 -0
  29. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +197 -0
  30. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +258 -0
  31. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +454 -0
  32. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +348 -0
  33. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +128 -0
  34. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +26 -0
  35. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +203 -0
  36. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +498 -0
  37. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +186 -0
  38. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +353 -0
  39. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +362 -0
  40. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +895 -0
  41. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +83 -0
  42. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +69 -0
  43. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +401 -0
  44. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +10 -0
  45. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +40 -0
  46. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +96 -0
  47. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +4 -0
  48. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +95 -0
  49. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +31 -0
  50. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +23 -0
  51. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
  52. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
  53. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +54 -0
  54. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +150 -0
  55. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +42 -0
  56. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +90 -0
  57. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +29 -0
  58. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +38 -0
  59. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +189 -0
  60. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +28 -0
  61. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +73 -0
  62. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +38 -0
  63. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +36 -0
  64. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +65 -0
  65. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +31 -0
  66. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +18 -0
  67. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +61 -0
  68. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +38 -0
  69. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +67 -0
  70. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +67 -0
  71. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +30 -0
  72. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +483 -0
  73. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +62 -0
  74. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +71 -0
  75. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
  76. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +150 -0
  77. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +88 -0
  78. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +54 -0
  79. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +373 -0
  80. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +78 -0
  81. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +5 -0
  82. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +85 -0
  83. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +46 -0
  84. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +78 -0
  85. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +11 -0
  86. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +74 -0
  87. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +73 -0
  88. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +125 -0
  89. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +88 -0
  90. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +17 -0
  91. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +59 -0
  92. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +28 -0
  93. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +3 -0
  94. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +19 -0
  95. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +45 -0
  96. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +119 -0
  97. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +40 -0
  98. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +43 -0
  99. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +91 -0
  100. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +54 -0
  101. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +93 -0
  102. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +64 -0
  103. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +71 -0
  104. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +66 -0
  105. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +203 -0
  106. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +177 -0
  107. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +339 -0
  108. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +30 -0
  109. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +31 -0
  110. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +22 -0
  111. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +23 -0
  112. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +71 -0
  113. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +40 -0
  114. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +29 -0
  115. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +61 -0
  116. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +622 -0
  117. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +1 -0
  118. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +19 -0
  119. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +70 -0
  120. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
  121. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
  122. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
  123. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +130 -0
  124. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +48 -0
  125. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +682 -0
  126. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +1489 -0
  127. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +863 -0
  128. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +1256 -0
  129. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +222 -0
  130. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +793 -0
  131. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +304 -0
  132. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +844 -0
  133. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +315 -0
  134. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +353 -0
  135. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +188 -0
  136. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +115 -0
  137. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +236 -0
  138. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +415 -0
  139. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +897 -0
  140. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +589 -0
  141. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +594 -0
  142. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +162 -0
  143. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +2026 -0
  144. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +18 -0
  145. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +7829 -0
  146. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +6 -0
  147. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +251 -0
  148. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +40 -0
  149. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +381 -0
  150. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +159 -0
  151. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +28 -0
  152. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +6 -0
  153. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +25 -0
  154. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +16 -0
  155. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +577 -0
  156. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +137 -0
  157. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +52 -0
  158. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +30 -0
  159. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +89 -0
  160. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +186 -0
  161. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +88 -0
  162. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +408 -0
  163. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +1 -0
  164. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +34 -0
  165. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +84 -0
  166. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +48 -0
  167. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +363 -0
  168. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +39 -0
  169. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +54 -0
  170. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +39 -0
  171. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +38 -0
  172. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +32 -0
  173. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +40 -0
  174. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +18 -0
  175. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +295 -0
  176. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +43 -0
  177. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +223 -0
  178. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +197 -0
  179. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +481 -0
  180. data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +28 -0
  181. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +406 -0
  182. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +683 -0
  183. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +161 -0
  184. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +756 -0
  185. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +151 -0
  186. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +2177 -0
  187. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +705 -0
  188. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +348 -0
  189. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +247 -0
  190. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +9 -0
  191. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +723 -0
  192. data/public/javascripts/old_sql/plotkit-0.9.1/README +1 -0
  193. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +2 -0
  194. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +2 -0
  195. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +302 -0
  196. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +139 -0
  197. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +172 -0
  198. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +81 -0
  199. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +155 -0
  200. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +50 -0
  201. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +428 -0
  202. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +330 -0
  203. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +368 -0
  204. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +256 -0
  205. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +436 -0
  206. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +299 -0
  207. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +159 -0
  208. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +64 -0
  209. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +131 -0
  210. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +34 -0
  211. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +131 -0
  212. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +34 -0
  213. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +334 -0
  214. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +151 -0
  215. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +304 -0
  216. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +144 -0
  217. data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
  218. data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
  219. data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
  220. data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
  221. data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +62 -0
  222. data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +37 -0
  223. data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
  224. data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
  225. data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
  226. data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
  227. data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
  228. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
  229. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +58 -0
  230. data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +31 -0
  231. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +25 -0
  232. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +143 -0
  233. data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +56 -0
  234. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +58 -0
  235. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +133 -0
  236. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +57 -0
  237. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +136 -0
  238. data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +161 -0
  239. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
  240. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
  241. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
  242. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
  243. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
  244. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
  245. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +38 -0
  246. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +43 -0
  247. data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +28 -0
  248. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +29 -0
  249. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +53 -0
  250. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +29 -0
  251. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +61 -0
  252. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +57 -0
  253. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +6 -0
  254. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +29 -0
  255. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +141 -0
  256. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +26 -0
  257. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +147 -0
  258. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +24 -0
  259. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +89 -0
  260. data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +66 -0
  261. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +20 -0
  262. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +31 -0
  263. metadata +264 -2
@@ -0,0 +1,723 @@
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