Subversion Repositories wimsdev

Rev

Rev 11018 | Blame | Last modification | View Log | RSS feed

  1.  
  2. <input type='text' size='10' value='' id='search'  onkeydown='javascripts:if(event.keyCode == 13){look();}'/><input type='button' onclick='javascript:look();' value='search' />
  3. <center><h3>Implemented canvasdraw commands (31-10-2016)</h3></center>
  4. <table style='color:blue;font-size:0.8em;'><tr>
  5.  
  6. <td><a name='canvasdraw top' href='#canvasdraw'>canvasdraw</a></td>
  7. <td><a name='size top' href='#size'>size</a></td>
  8. <td><a name='xrange top' href='#xrange'>xrange</a></td>
  9. <td><a name='rangex top' href='#xrange'>rangex</a></td>
  10. <td><a name='yrange top' href='#yrange'>yrange</a></td>
  11. <td><a name='rangey top' href='#yrange'>rangey</a></td>
  12. <td><a name='trange top' href='#trange'>trange</a></td>
  13. <td><a name='ranget top' href='#trange'>ranget</a></td>
  14. <td><a name='linewidth top' href='#linewidth'>linewidth</a></td>
  15. </tr><tr>
  16. <td><a name='crosshairsize top' href='#crosshairsize'>crosshairsize</a></td>
  17. <td><a name='crosshair top' href='#crosshair'>crosshair</a></td>
  18. <td><a name='crosshairs top' href='#crosshairs'>crosshairs</a></td>
  19. <td><a name='point top' href='#point'>point</a></td>
  20. <td><a name='points top' href='#points'>points</a></td>
  21. <td><a name='yerrorbars top' href='#yerrorbars'>yerrorbars</a></td>
  22. <td><a name='xerrorbars top' href='#xerrorbars'>xerrorbars</a></td>
  23. <td><a name='circle top' href='#circle'>circle</a></td>
  24. <td><a name='circles top' href='#circles'>circles</a></td>
  25. </tr><tr>
  26. <td><a name='disks top' href='#circles'>disks</a></td>
  27. <td><a name='segment top' href='#segment'>segment</a></td>
  28. <td><a name='seg top' href='#segment'>seg</a></td>
  29. <td><a name='segments top' href='#segments'>segments</a></td>
  30. <td><a name='segs top' href='#segments'>segs</a></td>
  31. <td><a name='line top' href='#line'>line</a></td>
  32. <td><a name='lines top' href='#lines'>lines</a></td>
  33. <td><a name='demiline top' href='#demiline'>demiline</a></td>
  34. <td><a name='halfline top' href='#demiline'>halfline</a></td>
  35. </tr><tr>
  36. <td><a name='demilines top' href='#demilines'>demilines</a></td>
  37. <td><a name='halflines top' href='#demilines'>halflines</a></td>
  38. <td><a name='hline top' href='#hline'>hline</a></td>
  39. <td><a name='horizontalline top' href='#hline'>horizontalline</a></td>
  40. <td><a name='hlines top' href='#hlines'>hlines</a></td>
  41. <td><a name='horizontallines top' href='#hlines'>horizontallines</a></td>
  42. <td><a name='vline top' href='#vline'>vline</a></td>
  43. <td><a name='verticalline top' href='#vline'>verticalline</a></td>
  44. <td><a name='vlines top' href='#vlines'>vlines</a></td>
  45. </tr><tr>
  46. <td><a name='verticallines top' href='#vlines'>verticallines</a></td>
  47. <td><a name='square top' href='#square'>square</a></td>
  48. <td><a name='rect top' href='#rect'>rect</a></td>
  49. <td><a name='rects top' href='#rects'>rects</a></td>
  50. <td><a name='roundrect top' href='#roundrect'>roundrect</a></td>
  51. <td><a name='roundrects top' href='#roundrects'>roundrects</a></td>
  52. <td><a name='polyline top' href='#polyline'>polyline</a></td>
  53. <td><a name='poly top' href='#poly'>poly</a></td>
  54. <td><a name='arc top' href='#arc'>arc</a></td>
  55. </tr><tr>
  56. <td><a name='angle top' href='#angle'>angle</a></td>
  57. <td><a name='ellipse top' href='#ellipse'>ellipse</a></td>
  58. <td><a name='dashtype top' href='#dashtype'>dashtype</a></td>
  59. <td><a name='rays top' href='#rays'>rays</a></td>
  60. <td><a name='arrowhead top' href='#arrowhead'>arrowhead</a></td>
  61. <td><a name='arrow top' href='#arrow'>arrow</a></td>
  62. <td><a name='vector top' href='#arrow'>vector</a></td>
  63. <td><a name='arrows top' href='#arrows'>arrows</a></td>
  64. <td><a name='vectors top' href='#arrows'>vectors</a></td>
  65. </tr><tr>
  66. <td><a name='arrow2 top' href='#arrow2'>arrow2</a></td>
  67. <td><a name='arrows2 top' href='#arrows2'>arrows2</a></td>
  68. <td><a name='parallel top' href='#parallel'>parallel</a></td>
  69. <td><a name='triangle top' href='#triangle'>triangle</a></td>
  70. <td><a name='triangles top' href='#triangles'>triangles</a></td>
  71. <td><a name='lattice top' href='#lattice'>lattice</a></td>
  72. <td><a name='multistrokeopacity top' href='#multistrokeopacity'>multistrokeopacity</a></td>
  73. <td><a name='multifillopacity top' href='#multifillopacity'>multifillopacity</a></td>
  74. <td><a name='multilabel top' href='#multilabel'>multilabel</a></td>
  75. </tr><tr>
  76. <td><a name='multilinewidth top' href='#multilinewidth'>multilinewidth</a></td>
  77. <td><a name='multidash top' href='#multidash'>multidash</a></td>
  78. <td><a name='multisnaptogrid top' href='#multisnaptogrid'>multisnaptogrid</a></td>
  79. <td><a name='multifill top' href='#multifill'>multifill</a></td>
  80. <td><a name='multistrokecolors top' href='#multistrokecolors'>multistrokecolors</a></td>
  81. <td><a name='multifillcolors top' href='#multifillcolors'>multifillcolors</a></td>
  82. <td><a name='multiuserinput top' href='#multiuserinput'>multiuserinput</a></td>
  83. <td><a name='multidraw top' href='#multidraw'>multidraw</a></td>
  84. <td><a name='ruler top' href='#ruler'>ruler</a></td>
  85. </tr><tr>
  86. <td><a name='protractor top' href='#protractor'>protractor</a></td>
  87. <td><a name='userdraw top' href='#userdraw'>userdraw</a></td>
  88. <td><a name='note: top' href='#note:'>note:</a></td>
  89. <td><a name='snaptofunction top' href='#snaptofunction'>snaptofunction</a></td>
  90. <td><a name='snaptofun top' href='#snaptofunction'>snaptofun</a></td>
  91. <td><a name='snaptopoints top' href='#snaptopoints'>snaptopoints</a></td>
  92. <td><a name='snaptogrid top' href='#snaptogrid'>snaptogrid</a></td>
  93. <td><a name='xsnaptogrid top' href='#xsnaptogrid'>xsnaptogrid</a></td>
  94. <td><a name='ysnaptogrid top' href='#ysnaptogrid'>ysnaptogrid</a></td>
  95. </tr><tr>
  96. <td><a name='userinput top' href='#userinput'>userinput</a></td>
  97. <td><a name='userinput_function top' href='#userinput'>userinput_function</a></td>
  98. <td><a name='userinput_textarea top' href='#userinput'>userinput_textarea</a></td>
  99. <td><a name='userinput_xy top' href='#userinput'>userinput_xy</a></td>
  100. <td><a name='usertextarea_xy top' href='#usertextarea_xy'>usertextarea_xy</a></td>
  101. <td><a name='userinput_xy top' href='#userinput_xy'>userinput_xy</a></td>
  102. <td><a name='functionlabel top' href='#functionlabel'>functionlabel</a></td>
  103. <td><a name='userinput_function top' href='#userinput_function'>userinput_function</a></td>
  104. <td><a name='plotsteps top' href='#plotsteps'>plotsteps</a></td>
  105. </tr><tr>
  106. <td><a name='fontsize top' href='#fontsize'>fontsize</a></td>
  107. <td><a name='fontcolor top' href='#fontcolor'>fontcolor</a></td>
  108. <td><a name='jscurve top' href='#jscurve'>jscurve</a></td>
  109. <td><a name='jsplot top' href='#jscurve'>jsplot</a></td>
  110. <td><a name='curve top' href='#curve'>curve</a></td>
  111. <td><a name='levelcurve top' href='#levelcurve'>levelcurve</a></td>
  112. <td><a name='bezier top' href='#bezier'>bezier</a></td>
  113. <td><a name='trace_jscurve top' href='#trace_jscurve'>trace_jscurve</a></td>
  114. <td><a name='jsmath top' href='#jsmath'>jsmath</a></td>
  115. </tr><tr>
  116. <td><a name='text top' href='#text'>text</a></td>
  117. <td><a name='textup top' href='#textup'>textup</a></td>
  118. <td><a name='fontfamily top' href='#fontfamily'>fontfamily</a></td>
  119. <td><a name='stringup top' href='#stringup'>stringup</a></td>
  120. <td><a name='string top' href='#string'>string</a></td>
  121. <td><a name='centerstring top' href='#centerstring'>centerstring</a></td>
  122. <td><a name='mathml top' href='#mathml'>mathml</a></td>
  123. <td><a name='http top' href='#http'>http</a></td>
  124. <td><a name='html top' href='#html'>html</a></td>
  125. </tr><tr>
  126. <td><a name='noaxis top' href='#noaxis'>noaxis</a></td>
  127. <td><a name='noayis top' href='#noayis'>noayis</a></td>
  128. <td><a name='xaxis top' href='#xaxis'>xaxis</a></td>
  129. <td><a name='xaxistext top' href='#xaxis'>xaxistext</a></td>
  130. <td><a name='xaxisup top' href='#xaxisup'>xaxisup</a></td>
  131. <td><a name='xaxistextup top' href='#xaxisup'>xaxistextup</a></td>
  132. <td><a name='yaxis top' href='#yaxis'>yaxis</a></td>
  133. <td><a name='axisnumbering top' href='#axisnumbering'>axisnumbering</a></td>
  134. <td><a name='axis top' href='#axis'>axis</a></td>
  135. </tr><tr>
  136. <td><a name='killslider top' href='#killslider'>killslider</a></td>
  137. <td><a name='sliderfunction_x top' href='#sliderfunction_x'>sliderfunction_x</a></td>
  138. <td><a name='sliderfunction_y top' href='#sliderfunction_y'>sliderfunction_y</a></td>
  139. <td><a name='slider top' href='#slider'>slider</a></td>
  140. <td><a name='sgraph top' href='#sgraph'>sgraph</a></td>
  141. <td><a name='grid top' href='#grid'>grid</a></td>
  142. <td><a name='opacity top' href='#opacity'>opacity</a></td>
  143. <td><a name='transparent top' href='#opacity'>transparent</a></td>
  144. <td><a name='rotationcenter top' href='#rotationcenter'>rotationcenter</a></td>
  145. </tr><tr>
  146. <td><a name='rotate top' href='#rotate'>rotate</a></td>
  147. <td><a name='killrotate top' href='#killrotate'>killrotate</a></td>
  148. <td><a name='killaffine top' href='#killaffine'>killaffine</a></td>
  149. <td><a name='affine top' href='#affine'>affine</a></td>
  150. <td><a name='killtranslation top' href='#killtranslation'>killtranslation</a></td>
  151. <td><a name='killtranslate top' href='#killtranslation'>killtranslate</a></td>
  152. <td><a name='translation top' href='#translation'>translation</a></td>
  153. <td><a name='translate top' href='#translation'>translate</a></td>
  154. <td><a name='animate top' href='#animate'>animate</a></td>
  155. </tr><tr>
  156. <td><a name='dashed top' href='#dashed'>dashed</a></td>
  157. <td><a name='filled top' href='#filled'>filled</a></td>
  158. <td><a name='highlight top' href='#highlight'>highlight</a></td>
  159. <td><a name='fillcolor top' href='#fillcolor'>fillcolor</a></td>
  160. <td><a name='strokecolor top' href='#strokecolor'>strokecolor</a></td>
  161. <td><a name='bgimage top' href='#bgimage'>bgimage</a></td>
  162. <td><a name='bgcolor top' href='#bgcolor'>bgcolor</a></td>
  163. <td><a name='copy top' href='#copy'>copy</a></td>
  164. <td><a name='copyresized top' href='#copyresized'>copyresized</a></td>
  165. </tr><tr>
  166. <td><a name='clearbutton top' href='#clearbutton'>clearbutton</a></td>
  167. <td><a name='delete top' href='#clearbutton'>delete</a></td>
  168. <td><a name='erase top' href='#clearbutton'>erase</a></td>
  169. <td><a name='inputstyle top' href='#inputstyle'>inputstyle</a></td>
  170. <td><a name='input top' href='#input'>input</a></td>
  171. <td><a name='textarea top' href='#textarea'>textarea</a></td>
  172. <td><a name='precision top' href='#precision'>precision</a></td>
  173. <td><a name='setlimits top' href='#setlimits'>setlimits</a></td>
  174. <td><a name='zoom top' href='#zoom'>zoom</a></td>
  175. </tr><tr>
  176. <td><a name='onclick top' href='#onclick'>onclick</a></td>
  177. <td><a name='drag top' href='#drag'>drag</a></td>
  178. <td><a name='blink top' href='#blink'>blink</a></td>
  179. <td><a name='xunit top' href='#xunit'>xunit</a></td>
  180. <td><a name='yunit top' href='#yunit'>yunit</a></td>
  181. <td><a name='cursor top' href='#cursor'>cursor</a></td>
  182. <td><a name='pointer top' href='#cursor'>pointer</a></td>
  183. <td><a name='display top' href='#display'>display</a></td>
  184. <td><a name='mouse_degree top' href='#mouse_degree'>mouse_degree</a></td>
  185. </tr><tr>
  186. <td><a name='mousex top' href='#mousex'>mousex</a></td>
  187. <td><a name='mousey top' href='#mousey'>mousey</a></td>
  188. <td><a name='mouse top' href='#mouse'>mouse</a></td>
  189. <td><a name='intooltip top' href='#intooltip'>intooltip</a></td>
  190. <td><a name='popup top' href='#popup'>popup</a></td>
  191. <td><a name='audio top' href='#audio'>audio</a></td>
  192. <td><a name='video top' href='#video'>video</a></td>
  193. <td><a name='hatchfill top' href='#hatchfill'>hatchfill</a></td>
  194. <td><a name='diamondfill top' href='#diamondfill'>diamondfill</a></td>
  195. </tr><tr>
  196. <td><a name='gridfill top' href='#gridfill'>gridfill</a></td>
  197. <td><a name='dotfill top' href='#dotfill'>dotfill</a></td>
  198. <td><a name='imagefill top' href='#imagefill'>imagefill</a></td>
  199. <td><a name='canvastype top' href='#canvastype'>canvastype</a></td>
  200. <td><a name='filltoborder top' href='#filltoborder'>filltoborder</a></td>
  201. <td><a name='floodfill top' href='#floodfill'>floodfill</a></td>
  202. <td><a name='fill top' href='#floodfill'>fill</a></td>
  203. <td><a name='setpixel top' href='#setpixel'>setpixel</a></td>
  204. <td><a name='pixelsize top' href='#pixelsize'>pixelsize</a></td>
  205. </tr><tr>
  206. <td><a name='pixels top' href='#pixels'>pixels</a></td>
  207. <td><a name='replyformat top' href='#replyformat'>replyformat</a></td>
  208. <td><a name='legendcolors top' href='#legendcolors'>legendcolors</a></td>
  209. <td><a name='legend top' href='#legend'>legend</a></td>
  210. <td><a name='xlabel top' href='#xlabel'>xlabel</a></td>
  211. <td><a name='ylabel top' href='#ylabel'>ylabel</a></td>
  212. <td><a name='linegraph top' href='#linegraph'>linegraph</a></td>
  213. <td><a name='barchart top' href='#barchart'>barchart</a></td>
  214. <td><a name='clock top' href='#clock'>clock</a></td>
  215. </tr><tr>
  216. <td><a name='piechart top' href='#piechart'>piechart</a></td>
  217. <td><a name='userboxplotdata top' href='#userboxplotdata'>userboxplotdata</a></td>
  218. <td><a name='userboxplot top' href='#userboxplot'>userboxplot</a></td>
  219. <td><a name='boxplotdata top' href='#boxplotdata'>boxplotdata</a></td>
  220. <td><a name='boxplot top' href='#boxplot'>boxplot</a></td>
  221. <td><a name='status top' href='#status'>status</a></td>
  222. <td><a name='xlogbase top' href='#xlogbase'>xlogbase</a></td>
  223. <td><a name='ylogbase top' href='#ylogbase'>ylogbase</a></td>
  224. <td><a name='xlogscale top' href='#xlogscale'>xlogscale</a></td>
  225. </tr><tr>
  226. <td><a name='ylogscale top' href='#ylogscale'>ylogscale</a></td>
  227. <td><a name='xylogscale top' href='#xylogscale'>xylogscale</a></td>
  228. <td>&nbsp;</td>
  229. <td>&nbsp;</td>
  230. <td>&nbsp;</td>
  231. <td>&nbsp;</td>
  232. <td>&nbsp;</td>
  233. <td>&nbsp;</td>
  234. <td>&nbsp;</td>
  235. </tr></table>
  236. <ul>
  237. <li><a name='canvasdraw' href='#canvasdraw top'>  canvasdraw</a><ul>
  238. <li><span style="color:blue;font-size:0.8em"> will try use the same syntax as flydraw or svgdraw to paint a html5 bitmap image<br />by generating a tailor-made javascript include file: providing only the js-functionality needed to perform the job.<br />thus ensuring a minimal strain on the client browser <br />(unlike some popular 'canvas-do-it-all' libraries, who have proven to be not suitable for low-end computers found in schools...)
  239. </span></li>
  240. <li><span style="color:blue;font-size:0.8em"> general syntax <ul><li>The transparency of all objects can be controlled by command <a href="#opacity">'opacity [0-255],[0,255]'</a></il><li>line width of any object can be controlled by command <a href="#linewidth">'linewidth int'</a></li><li>any may be dashed by using keyword <a href="#dashed">'dashed'</a> before the object command.<br />the dashing type can be controled by command <a href="#dashtype">'dashtype int,int'</a></li><li>a fillable object can be set fillable by starting the object command with an 'f'<br />(like frect,fcircle,ftriangle...)<br />or by using the keyword <a href="#filled">'filled'</a> before the object command.<br />The fill colour of 'non_userdraw' objects will be the stroke colour...(flydraw harmonization 19/10/2013)</li><li>all draggable objects may have a <a href="#slider">slider</a> for translation / rotation; several objects may be translated / rotated by a single slider</li> <li> a draggable object can be set draggable by a preceding command <a href="#drag">'drag x/y/xy'</a><br />The translation can be read by javascript:read_dragdrop();The replyformat is : object_number : x-orig : y-orig : x-drag : y-drag<br />The x-orig/y-orig will be returned in maximum precision (javascript float)...<br />the x-drag/y-drag will be returned in defined 'precision' number of decimals<br />Multiple objects may be set draggable / clickable (no limit)<br /> not all flydraw objects may be dragged / clicked<br />Only draggable / clickable objects will be scaled on <a href="#zoom">zoom</a> and will be translated in case of panning</li><li> a 'onclick object' can be set 'clickable' by the preceding keyword <a href="#onclick">'onclick'</a><br />not all flydraw objects can be set clickable</li><li><b>remarks using a ';' as command separator</b><br />commands with only numeric or colour arguments may be using a ';' as command separator (instead of a new line)<br />commands with a string argument may not use a ';' as command separator !<br />these exceptions are not really straight forward... so keep this in mind.</li><li>almost every <a href="#userdraw">"userdraw object,color"</a> or <a href="#multidraw">"multidraw"</a> command 'family' may be combined with keywords <a href="#snaptogrid">"snaptogrid | xsnaptogrid | ysnaptogrid | snaptofunction</a> or command "snaptopoints x1,y1,x2,y2,..." </li><li>every draggable | onclick object may be combined with keywords <a href="#snaptogrid">snaptogrid | xsnaptogrid | ysnaptogrid | snaptofunction</a> or command "snaptopoints x1,y1,x2,y2,..." </li><li>almost every command for a single object has a multiple objects counterpart:<br /><ul>general syntaxrule:<li><em>single_object</em> x1,y1,...,color</li><li><em>multi_object</em> color,x1,y1,...</li></ul><li>All inputfields or textareas generated, can be styled individually using command <a href="#inputstyle">'inputstyle some_css'</a><br/>the fontsize used for labeling these elements can be controlled by command <a href="fontsize">'fontsize int'</a> <br />command 'fontfamily' is <b>not</b> active for these elements </li></ul>
  241. </span></li>
  242. <li><span style="color:blue;font-size:0.8em"> If needed multiple interactive scripts may be used in a single webpage.<br />A function 'read_canvas()' and / or 'read_dragdrop()' can read all interactive userdata from these images.<br />The global array 'canvas_scripts' will contain all unique random "canvas_root_id" of the included scripts.<br />The included local javascript "read" functions "read_canvas%d()" and "read_dragdrop%d()" will have this "%d = canvas_root_id"<br />e.g. canvas_scripts[0] will be the random id of the first script in the page and will thus provide a function<br />fun = eval("read_canvas"+canvas_scripts[0]) to read user based drawings / inputfield in this first image.<br />The read_dragdrop is analogue.<br />If the default reply formatting is not suitable, use command <a href='#replyformat'>'replyformat'</a> to format the replies for an individual canvas script,<br />To read all user interactions from all included canvas scripts , use something like:<br /><em>function read_all_canvas_images(){<br />&nbsp;var script_len = canvas_scripts.length;<br />&nbsp;var draw_reply = "";<br />&nbsp;var found_result = false;<br />&nbsp;for(var p = 0 ; p < script_len ; p++){<br />&nbsp;&nbsp;var fun = eval("read_canvas"+canvas_scripts[p]);<br />&nbsp;&nbsp;if( typeof fun === 'function'){<br />&nbsp;&nbsp;&nbsp;var result = fun();<br />&nbsp;&nbsp;&nbsp;if( result&nbsp;&nbsp;&& result.length != 0){<br />&nbsp;&nbsp;&nbsp;&nbsp;if(script_len == 1 ){ return result;};<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;found_result = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;draw_reply = draw_reply + result + "\n";<br />&nbsp;&nbsp;&nbsp;&nbsp;};<br />&nbsp;&nbsp;&nbsp;};<br />&nbsp;&nbsp;};<br />&nbsp;if( found_result ){return draw_reply;}else{return null;};<br />};</em>
  243. </span></li>
  244. <li><span style="color:blue;font-size:0.8em"> you can check the javascript reply format in the wims tool <a href="http://localhost/wims/wims.cgi?lang=en&module=tool/directexec">direct exec</a>
  245. </span></li>
  246. <li><span style="color:blue;font-size:0.8em"> for usage within OEF (without anstype "draw"), something like this (a popup function plotter) will work:<br /><small>\text{popup_grapher=wims(exec canvasdraw <br />popup<br />size 400,400<br />xrange -10,10<br />yrange -10,10<br />axis<br />axisnumbering<br />opacity 100,100<br />grid 2,2,grey,2,2,6,black<br />snaptogrid<br />linewidth 2<br />jsplot red,5*sin(1/x)<br />strokecolor green<br />functionlabel f(x)=<br />userinput function<br />mouse blue,22<br />)<br />}<br />\statement{<br />\popup_grapher<br />}</small>
  247. </span></li>
  248. <li><span style="color:blue;font-size:0.8em"> be aware that older browsers will probably not work correctly<br />no effort has been undertaken to add glue code for older browsers !! <br />in any case it's not wise to use older browsers...not just for canvasdraw
  249. </span></li>
  250. <li><span style="color:blue;font-size:0.8em"> if you find flaws, errors or other incompatibilities -not those mentioned in this document- send <a href='mailto:jm.evers-at-schaersvoorde.nl'>me</a> an email with screenshots and the generated javascript include file.
  251. </span></li>
  252. <li><span style="color:blue;font-size:0.8em"> there is limited support for touch devices : touchstart,touchmove and touchend in commands <a href="#userdraw">userdraw primitives </a>, <a href="#protractor">protractor</a> and <a href="#ruler">ruler</a><br />only single finger gestures are supported (for now)<br />for more accurate user-interaction with canvasdraw on touch devices: use the command family <a href="userinput_xy">userinput</a>
  253. </span></li>
  254. </ul>
  255. <li><a name='size' href='#size top'>  size width,height</a><ul>
  256. <li><span style="color:blue;font-size:0.8em"> set canvas size in pixels
  257. </span></li>
  258. <li><span style="color:blue;font-size:0.8em"> mandatory first command (can only be preceded by keyword <a href="#popup">'popup'</a>)
  259. </span></li>
  260. <li><span style="color:blue;font-size:0.8em"> if xrange and/or yrange is not given the range will be set to pixels :<br />xrange 0,xsize yrange 0,ysize<br />note: lower left corner is Origin (0:0) !!! this in contrast to flydraw
  261. </span></li>
  262. </ul>
  263. <li><a name='xrange' href='#xrange top'>  xrange xmin,xmax</a><ul>
  264. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='rangex' href='#rangex top'>rangex</a></span></li>
  265. <li><span style="color:blue;font-size:0.8em"> if not given: 0,xsize (eg in pixels)
  266. </span></li>
  267. </ul>
  268. <li><a name='yrange' href='#yrange top'>  yrange ymin,ymax</a><ul>
  269. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='rangey' href='#rangey top'>rangey</a></span></li>
  270. <li><span style="color:blue;font-size:0.8em"> if not given 0,ysize (eg in pixels)
  271. </span></li>
  272. </ul>
  273. <li><a name='trange' href='#trange top'>  trange tmin,tmax</a><ul>
  274. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='ranget' href='#ranget top'>ranget</a></span></li>
  275. <li><span style="color:blue;font-size:0.8em"> default -2,2
  276. </span></li>
  277. </ul>
  278. <li><a name='linewidth' href='#linewidth top'>  linewidth int</a><ul>
  279. <li><span style="color:blue;font-size:0.8em"> default 1
  280. </span></li>
  281. </ul>
  282. <li><a name='crosshairsize' href='#crosshairsize top'>  crosshairsize int</a><ul>
  283. <li><span style="color:blue;font-size:0.8em"> default 8 (px)
  284. </span></li>
  285. </ul>
  286. <li><a name='crosshair' href='#crosshair top'>  crosshair x,y,color</a><ul>
  287. <li><span style="color:blue;font-size:0.8em"> draw a single crosshair point at (x;y) in color 'color'
  288. </span></li>
  289. <li><span style="color:blue;font-size:0.8em"> use command 'crosshairsize int' and / or 'linewidth int' to adust
  290. </span></li>
  291. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  292. </span></li>
  293. </ul>
  294. <li><a name='crosshairs' href='#crosshairs top'>  crosshairs color,x1,y1,x2,y2,...,x_n,y_n</a><ul>
  295. <li><span style="color:blue;font-size:0.8em"> draw multiple crosshair points at given coordinates in color 'color'
  296. </span></li>
  297. <li><span style="color:blue;font-size:0.8em"> use command 'crosshairsize int' and / or 'linewidth int' to adust
  298. </span></li>
  299. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
  300. </span></li>
  301. </ul>
  302. <li><a name='point' href='#point top'>  point x,y,color</a><ul>
  303. <li><span style="color:blue;font-size:0.8em"> draw a single point at (x;y) in color 'color'
  304. </span></li>
  305. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adust size
  306. </span></li>
  307. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  308. </span></li>
  309. <li><span style="color:blue;font-size:0.8em"> will not resize on zooming <br />(command 'circle x,y,r,color' will resize on zooming)
  310. </span></li>
  311. <li><span style="color:blue;font-size:0.8em"> attention: in case of command <a href="#rotate">'rotate angle'</a> a point has rotation center (0:0) in x/y-range
  312. </span></li>
  313. </ul>
  314. <li><a name='points' href='#points top'>  points color,x1,y1,x2,y2,...,x_n,y_n</a><ul>
  315. <li><span style="color:blue;font-size:0.8em"> draw multiple points at given coordinates in color 'color'
  316. </span></li>
  317. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adust size
  318. </span></li>
  319. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
  320. </span></li>
  321. <li><span style="color:blue;font-size:0.8em"> attention: in case of command <a href="#rotate">'rotate angle'</a> the points have rotation center (0:0) in x/y-range
  322. </span></li>
  323. </ul>
  324. <li><a name='yerrorbars' href='#yerrorbars top'>  yerrorbars color,E1,E2,x1,y1,x2,y2,...,x_n,y_n</a><ul>
  325. <li><span style="color:blue;font-size:0.8em"> draw multiple points with y-errorbars E1 (error value under point) and E2 (error value above point) at given coordinates in color 'color'
  326. </span></li>
  327. <li><span style="color:blue;font-size:0.8em"> the errors E1 and E2 values are in yrange.
  328. </span></li>
  329. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adust size
  330. </span></li>
  331. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
  332. </span></li>
  333. </ul>
  334. <li><a name='xerrorbars' href='#xerrorbars top'>  xerrorbars color,E1,E2,x1,y1,x2,y2,...,x_n,y_n</a><ul>
  335. <li><span style="color:blue;font-size:0.8em"> draw multiple points with x-errorbars E1 (error value left from point) and E2 (error value right from point) at given coordinates in color 'color'
  336. </span></li>
  337. <li><span style="color:blue;font-size:0.8em"> the errors E1 and E2 values are in xrange.
  338. </span></li>
  339. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adust size
  340. </span></li>
  341. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
  342. </span></li>
  343. </ul>
  344. <li><a name='circle' href='#circle top'>  circle xc,yc,width (2*r in pixels),color</a><ul>
  345. <li><span style="color:blue;font-size:0.8em"> use command 'fcircle xc,yc,d,color'
  346. </span></li>
  347. <li><span style="color:blue;font-size:0.8em"> alternative: disk for a filled circle
  348. </span></li>
  349. <li><span style="color:blue;font-size:0.8em"> use command 'fillcolor color' to set the fillcolor
  350. </span></li>
  351. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  352. </span></li>
  353. <li><span style="color:blue;font-size:0.8em"> will shrink / expand on zoom out / zoom in
  354. </span></li>
  355. </ul>
  356. <li><a name='circles' href='#circles top'>  circles color,xc1,yc1,r1,xc2,yc2,r2...xc_n,yc_n,r_n</a><ul>
  357. <li><span style="color:blue;font-size:0.8em"> <b>attention</b> r = radius in x-range (!)
  358. </span></li>
  359. <li><span style="color:blue;font-size:0.8em"> use keyword 'filled' or command 'fcircles' to produce solid circles
  360. </span></li>
  361. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='disks' href='#disks top'>disks</a></span></li>
  362. <li><span style="color:blue;font-size:0.8em"> use command 'fillcolor color' to set the fillcolor
  363. </span></li>
  364. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> (individually)
  365. </span></li>
  366. <li><span style="color:blue;font-size:0.8em"> will shrink / expand on zoom out / zoom in
  367. </span></li>
  368. </ul>
  369. <li><a name='segment' href='#segment top'>  segment x1,y1,x2,y2,color</a><ul>
  370. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='seg' href='#seg top'>seg</a></span></li>
  371. <li><span style="color:blue;font-size:0.8em"> draw a line segment between points (x1:y1)--(x2:y2) in color 'color'
  372. </span></li>
  373. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  374. </span></li>
  375. </ul>
  376. <li><a name='segments' href='#segments top'>  segments color,x1,y1,x2,y2,...,x_n,y_n</a><ul>
  377. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='segs' href='#segs top'>segs</a></span></li>
  378. <li><span style="color:blue;font-size:0.8em"> draw multiple segments between points (x1:y1)--(x2:y2).....and... (x_n-1:y_n-1)--(x_n:y_n) in color 'color'
  379. </span></li>
  380. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adust size
  381. </span></li>
  382. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
  383. </span></li>
  384. </ul>
  385. <li><a name='line' href='#line top'>  line x1,y1,x2,y2,color</a><ul>
  386. <li><span style="color:blue;font-size:0.8em"> draw a line through points (x1:y1)--(x2:y2) in color 'color'
  387. </span></li>
  388. <li><span style="color:blue;font-size:0.8em"> or use command 'curve color,formula' to draw the line <br />(uses more points to draw the line; is however better draggable)
  389. </span></li>
  390. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  391. </span></li>
  392. </ul>
  393. <li><a name='lines' href='#lines top'>  lines color,x1,y1,x2,y2...x_n-1,y_n-1,x_n,y_n</a><ul>
  394. <li><span style="color:blue;font-size:0.8em"> draw multiple lines through points (x1:y1)--(x2:y2) ...(x_n-1:y_n-1)--(x_n:y_n) in color 'color'
  395. </span></li>
  396. <li><span style="color:blue;font-size:0.8em"> or use multiple commands 'curve color,formula' or "jscurve color,formule" to draw the line <br />(uses more points to draw the line; is however better draggable)
  397. </span></li>
  398. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  399. </span></li>
  400. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: the flydraw command "lines" is equivalent to canvasdraw command <a href="#polyline">"polyline"</a>
  401. </span></li>
  402. </ul>
  403. <li><a name='demiline' href='#demiline top'>  demiline x1,y1,x2,y2,color</a><ul>
  404. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='halfline' href='#halfline top'>halfline</a></span></li>
  405. <li><span style="color:blue;font-size:0.8em"> draws a halfline starting in (x1:y1) and through (x2:y2) in color 'color' (colorname or hex)
  406. </span></li>
  407. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  408. </span></li>
  409. </ul>
  410. <li><a name='demilines' href='#demilines top'>  demilines color,x1,y1,x2,y2,....</a><ul>
  411. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='halflines' href='#halflines top'>halflines</a></span></li>
  412. <li><span style="color:blue;font-size:0.8em"> draws halflines starting in (x1:y1) and through (x2:y2) in color 'color' (colorname or hex) etc etc
  413. </span></li>
  414. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> indiviually
  415. </span></li>
  416. </ul>
  417. <li><a name='hline' href='#hline top'>  hline x,y,color</a><ul>
  418. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='horizontalline' href='#horizontalline top'>horizontalline</a></span></li>
  419. <li><span style="color:blue;font-size:0.8em"> draw a horizontal line through point (x:y) in color 'color'
  420. </span></li>
  421. <li><span style="color:blue;font-size:0.8em"> or use command <a href='#curve'>'curve color,formula'</a> to draw the line <br />(uses more points to draw the line; is however better draggable)
  422. </span></li>
  423. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  424. </span></li>
  425. </ul>
  426. <li><a name='hlines' href='#hlines top'>  hlines color,x1,y1,x2,y2,...</a><ul>
  427. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='horizontallines' href='#horizontallines top'>horizontallines</a></span></li>
  428. <li><span style="color:blue;font-size:0.8em"> draw horizontal lines through points (x1:y1)...(xn:yn) in color 'color'
  429. </span></li>
  430. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
  431. </span></li>
  432. </ul>
  433. <li><a name='vline' href='#vline top'>  vline x,y,color</a><ul>
  434. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='verticalline' href='#verticalline top'>verticalline</a></span></li>
  435. <li><span style="color:blue;font-size:0.8em"> draw a vertical line through point (x:y) in color 'color'
  436. </span></li>
  437. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  438. </span></li>
  439. </ul>
  440. <li><a name='vlines' href='#vlines top'>  vlines color,x1,y1,x2,y2....</a><ul>
  441. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='verticallines' href='#verticallines top'>verticallines</a></span></li>
  442. <li><span style="color:blue;font-size:0.8em"> draw vertical lines through points (x1:y1),(x2:y2)... in color 'color'
  443. </span></li>
  444. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
  445. </span></li>
  446. </ul>
  447. <li><a name='square' href='#square top'>  square x,y,side (px) ,color</a><ul>
  448. <li><span style="color:blue;font-size:0.8em"> draw a square with left top corner (x:y) with side 'side' in color 'color'
  449. </span></li>
  450. <li><span style="color:blue;font-size:0.8em"> use command 'fsquare x,y,side,color' for a filled square
  451. </span></li>
  452. <li><span style="color:blue;font-size:0.8em"> use command/keyword <a href='#filled'>'filled'</a> before command 'square x,y,side,color'
  453. </span></li>
  454. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  455. </span></li>
  456. </ul>
  457. <li><a name='rect' href='#rect top'>  rect x1,y1,x2,y2,color</a><ul>
  458. <li><span style="color:blue;font-size:0.8em"> use command 'frect x1,y1,x2,y2,color' for a filled rectangle
  459. </span></li>
  460. <li><span style="color:blue;font-size:0.8em"> use command/keyword <a href='#filled'>'filled'</a> before command 'rect x1,y1,x2,y2,color'
  461. </span></li>
  462. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  463. </span></li>
  464. </ul>
  465. <li><a name='rects' href='#rects top'>  rects color,x1,y1,x2,y2,.....</a><ul>
  466. <li><span style="color:blue;font-size:0.8em"> use command 'frect color,x1,y1,x2,y2,.....' for a filled rectangle
  467. </span></li>
  468. <li><span style="color:blue;font-size:0.8em"> use command/keyword <a href='#filled'>'filled'</a> before command 'rects color,x1,y1,x2,y2,....'
  469. </span></li>
  470. <li><span style="color:blue;font-size:0.8em"> use command 'fillcolor color' before 'frects' to set the fill colour.
  471. </span></li>
  472. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
  473. </span></li>
  474. </ul>
  475. <li><a name='roundrect' href='#roundrect top'>  roundrect x1,y1,x2,y2,radius in px,color</a><ul>
  476. <li><span style="color:blue;font-size:0.8em"> use command 'froundrect x1,y1,x2,y2,radius,color' for a filled rectangle
  477. </span></li>
  478. <li><span style="color:blue;font-size:0.8em"> use command/keyword <a href='#filled'>'filled'</a> before command 'roundrect x1,y1,x2,y2,radius,color'
  479. </span></li>
  480. <li><span style="color:blue;font-size:0.8em"> fillcolor will be identical to 'color'
  481. </span></li>
  482. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  483. </span></li>
  484. </ul>
  485. <li><a name='roundrects' href='#roundrects top'>  roundrects color,radius in px,x1,y1,x2,y2,x3,y3,x4,y4,....</a><ul>
  486. <li><span style="color:blue;font-size:0.8em"> for filled roundrects use command/keyword <a href='#filled'>'filled'</a> before command
  487. </span></li>
  488. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
  489. </span></li>
  490. </ul>
  491. <li><a name='polyline' href='#polyline top'>  polyline color,x1,y1,x2,y2...x_n,y_n</a><ul>
  492. <li><span style="color:blue;font-size:0.8em"> brokenline color,x1,y1,x2,y2...x_n,y_n
  493. </span></li>
  494. <li><span style="color:blue;font-size:0.8em"> path color,x1,y1,x2,y2...x_n,y_n
  495. </span></li>
  496. <li><span style="color:blue;font-size:0.8em"> remark: there is <b>no</b> command polylines | brokenlines | paths ... just use multiple commands "polyline ,x1,y1,x2,y2...x_n,y_n"
  497. </span></li>
  498. <li><span style="color:blue;font-size:0.8em"> remark: there are commands "userdraw path(s),color" and "userdraw polyline,color"... these are two entirely different things !<br />the path(s) userdraw commands may be used for freehand drawing(s)<br />the polyline userdraw command is analogue to this polyline|brokenline command
  499. </span></li>
  500. <li><span style="color:blue;font-size:0.8em"> the command interconnects the points in the given order with a line (canvasdraw will not close the drawing: use command <a href="#poly">polygon</a> for this)
  501. </span></li>
  502. <li><span style="color:blue;font-size:0.8em"> use command <a href='#segments'>'segments'</a> for a series of segments.<br />these may be clicked/dragged individually
  503. </span></li>
  504. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  505. </span></li>
  506. </ul>
  507. <li><a name='poly' href='#poly top'>  poly color,x1,y1,x2,y2...x_n,y_n</a><ul>
  508. <li><span style="color:blue;font-size:0.8em"> polygon color,x1,y1,x2,y2...x_n,y_n
  509. </span></li>
  510. <li><span style="color:blue;font-size:0.8em"> draw closed polygon
  511. </span></li>
  512. <li><span style="color:blue;font-size:0.8em"> use command 'fpoly' to fill it or use keyword <a href='#filled'>'filled'</a>
  513. </span></li>
  514. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  515. </span></li>
  516. </ul>
  517. <li><a name='arc' href='#arc top'>  arc xc,yc,width,height,start_angle,end_angle,color</a><ul>
  518. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set "onclick" or "drag xy"
  519. </span></li>
  520. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: width in height in x/y-range
  521. </span></li>
  522. <li><span style="color:blue;font-size:0.8em"> will not zoom in or zoom out (because radius is given in pixels an not in x/y-system !). Panning will work
  523. </span></li>
  524. <li><span style="color:blue;font-size:0.8em"> use command <a href='#angle'>'angle'</a> for scalable angle
  525. </span></li>
  526. </ul>
  527. <li><a name='angle' href='#angle top'>  angle xc,yc,width,start_angle,end_angle,color</a><ul>
  528. <li><span style="color:blue;font-size:0.8em"> width is in x-range
  529. </span></li>
  530. <li><span style="color:blue;font-size:0.8em"> will zoom in/out
  531. </span></li>
  532. <li><span style="color:blue;font-size:0.8em"> if size is controlled by command <a href='#slider'>'slider'</a> use radians to set limits of slider.
  533. </span></li>
  534. </ul>
  535. <li><a name='ellipse' href='#ellipse top'>  ellipse xc,yc,radius_x,radius_y,color</a><ul>
  536. <li><span style="color:blue;font-size:0.8em"> a ellipse with center xc/yc in x/y-range
  537. </span></li>
  538. <li><span style="color:blue;font-size:0.8em"> radius_x and radius_y are in pixels
  539. </span></li>
  540. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  541. </span></li>
  542. <li><span style="color:blue;font-size:0.8em"> will shrink / expand on zoom out / zoom in
  543. </span></li>
  544. </ul>
  545. <li><a name='dashtype' href='#dashtype top'>  dashtype line_width_px,space_width_px</a><ul>
  546. <li><span style="color:blue;font-size:0.8em"> every indiviual object may have its own dashtype, if needed...
  547. </span></li>
  548. <li><span style="color:blue;font-size:0.8em"> When keyword <a href='#dashed'>dashed</a> is set, the objects will be drawn with this dashtype
  549. </span></li>
  550. <li><span style="color:blue;font-size:0.8em"> default value "dashtype 2,2" e.g. 2px line and 2px space
  551. </span></li>
  552. <li><span style="color:blue;font-size:0.8em"> html5 canvas specification supports more arguments (dashing schemes) ... but not all modern browsers are yet capable
  553. </span></li>
  554. </ul>
  555. <li><a name='rays' href='#rays top'>  rays color,xc,yc,x1,y1,x2,y2,x3,y3...x_n,y_n</a><ul>
  556. <li><span style="color:blue;font-size:0.8em"> draw rays in color 'color' and center (xc:yc)
  557. </span></li>
  558. <li><span style="color:blue;font-size:0.8em"> may be set draggable or onclick (every individual ray)
  559. </span></li>
  560. </ul>
  561. <li><a name='arrowhead' href='#arrowhead top'>  arrowhead int</a><ul>
  562. <li><span style="color:blue;font-size:0.8em"> default 8 (pixels)
  563. </span></li>
  564. </ul>
  565. <li><a name='arrow' href='#arrow top'>  arrow x1,y1,x2,y2,h,color</a><ul>
  566. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='vector' href='#vector top'>vector</a></span></li>
  567. <li><span style="color:blue;font-size:0.8em"> draw a single headed arrow / vector from (x1:y1) to (x2:y2)<br />with arrowhead size h in px and in color 'color'
  568. </span></li>
  569. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adjust thickness of the arrow
  570. </span></li>
  571. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  572. </span></li>
  573. </ul>
  574. <li><a name='arrows' href='#arrows top'>  arrows color,head (px),x1,y1,x2,y2...x_n,y_n</a><ul>
  575. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='vectors' href='#vectors top'>vectors</a></span></li>
  576. <li><span style="color:blue;font-size:0.8em"> draw single headed arrows / vectors from (x1:y1) to (x2:y2) ... (x3:y3) to (x4:y4) etc ... in color 'color'
  577. </span></li>
  578. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adjust thickness of the arrow
  579. </span></li>
  580. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
  581. </span></li>
  582. </ul>
  583. <li><a name='arrow2' href='#arrow2 top'>  arrow2 x1,y1,x2,y2,h,color</a><ul>
  584. <li><span style="color:blue;font-size:0.8em"> draw a double headed arrow/vector from (x1:y1) to (x2:y2)<br />with arrowhead size h in px and in color 'color'
  585. </span></li>
  586. <li><span style="color:blue;font-size:0.8em"> use command 'arrowhead int' to adjust the arrow head size
  587. </span></li>
  588. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adjust thickness of the arrow
  589. </span></li>
  590. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  591. </span></li>
  592. </ul>
  593. <li><a name='arrows2' href='#arrows2 top'>  arrows2 color,head (px),x1,y1,x2,y2...x_n,y_n</a><ul>
  594. <li><span style="color:blue;font-size:0.8em"> draw double headed arrows / vectors from (x1:y1) to (x2:y2) ... (x3:y3) to (x4:y4) etc ... in color 'color'
  595. </span></li>
  596. <li><span style="color:blue;font-size:0.8em"> use command 'linewidth int' to adjust thickness of the arrows
  597. </span></li>
  598. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
  599. </span></li>
  600. </ul>
  601. <li><a name='parallel' href='#parallel top'>  parallel x1,y1,x2,y2,dx,dy,n,[colorname or #hexcolor]</a><ul>
  602. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set "onclick" or "drag xy"
  603. </span></li>
  604. </ul>
  605. <li><a name='triangle' href='#triangle top'>  triangle x1,y1,x2,y2,x3,y3,color</a><ul>
  606. <li><span style="color:blue;font-size:0.8em"> use ftriangle or keyword <a href='#filled'>'filled'</a> for a solid triangle
  607. </span></li>
  608. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  609. </span></li>
  610. </ul>
  611. <li><a name='triangles' href='#triangles top'>  triangles color,x1,y1,x2,y2,x3,y3,...</a><ul>
  612. <li><span style="color:blue;font-size:0.8em"> use ftriangles or keyword <a href='#filled'>'filled'</a> for solid triangles
  613. </span></li>
  614. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
  615. </span></li>
  616. </ul>
  617. <li><a name='lattice' href='#lattice top'>  lattice x0,y0,xv1,yv1,xv2,yv2,n1,n2,color</a><ul>
  618. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set "onclick" or "drag xy"
  619. </span></li>
  620. </ul>
  621. <li><a name='multistrokeopacity' href='#multistrokeopacity top'>  multistrokeopacity stroke_opacity_1,stroke_opacity_2,...,stroke_opacity_7</a><ul>
  622. <li><span style="color:blue;font-size:0.8em"> float values 0 - 1 or integer values 0 - 255
  623. </span></li>
  624. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  625. </span></li>
  626. <li><span style="color:blue;font-size:0.8em"> if not set all stroke opacity_ will be set by previous command <em>'opacity int,int'</em>
  627. </span></li>
  628. <li><span style="color:blue;font-size:0.8em"> use these up to 7 different stroke opacities for the draw primitives used by command <em>'multidraw obj_type_1,obj_type_2...obj_type_7</em>
  629. </span></li>
  630. <li><span style="color:blue;font-size:0.8em"> wims will not check the amount or validity of your input
  631. </span></li>
  632. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  633. </span></li>
  634. </ul>
  635. <li><a name='multifillopacity' href='#multifillopacity top'>  multifillopacity fill_opacity_1,fill_opacity_2,...,fill_opacity_8</a><ul>
  636. <li><span style="color:blue;font-size:0.8em"> float values 0 - 1 or integer values 0 - 255
  637. </span></li>
  638. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  639. </span></li>
  640. <li><span style="color:blue;font-size:0.8em"> if not set all fill opacity_ will be set by previous command <em>'opacity int,int'</em> and keyword <em>'filled'</em>
  641. </span></li>
  642. <li><span style="color:blue;font-size:0.8em"> use these up to 7 different stroke opacities for the draw primitives used by command <em>'multidraw obj_type_1,obj_type_2...obj_type_y</em>
  643. </span></li>
  644. <li><span style="color:blue;font-size:0.8em"> wims will not check the amount or validity of your input
  645. </span></li>
  646. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  647. </span></li>
  648. </ul>
  649. <li><a name='multilabel' href='#multilabel top'>  multilabel button_label_1,button_label_2,...,button_label_8,'stop drawing text'</a><ul>
  650. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  651. </span></li>
  652. <li><span style="color:blue;font-size:0.8em"> if not set all labels (e.g. the value='' of input type 'button') will be set by the english names for the draw_primitives (like 'point','circle'...)
  653. </span></li>
  654. <li><span style="color:blue;font-size:0.8em"> the 'stop drawing' button text <b>must</b> be the last item on the 'multilabel' -list <br />for example:<br /><em>multilabel punten,lijnen,Stop met Tekenen<br />multidraw points,lines</em>
  655. </span></li>
  656. <li><span style="color:blue;font-size:0.8em"> all buttons can be 'styled' by using commant 'inputstyle'<br /><b>note:</b><em>If you want to add some CSS style to the buttons...<br />the id's of the 'draw buttons' are their english command argument<br />(e.g. id="canvasdraw_points" for the draw points button).<br />the id of the 'stop drawing' button is "canvasdraw_stop_drawing".<br />the id of the "OK" button is"canvasdraw_ok_button"</em>
  657. </span></li>
  658. <li><span style="color:blue;font-size:0.8em"> wims will not check the amount or validity of your input
  659. </span></li>
  660. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  661. </span></li>
  662. </ul>
  663. <li><a name='multilinewidth' href='#multilinewidth top'>  multilinewidth linewidth_1,linewidth_2,...,linewidth_8</a><ul>
  664. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  665. </span></li>
  666. <li><span style="color:blue;font-size:0.8em"> if not set all line width will be set by a previous command <em>'linewidth int'</em>
  667. </span></li>
  668. <li><span style="color:blue;font-size:0.8em"> use these up to 7 different line widths for the draw primitives used by command <em>'multidraw obj_type_1,obj_type_2...obj_type_7</em>
  669. </span></li>
  670. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check if the number of 0 or 1's matches the amount of draw primitives...
  671. </span></li>
  672. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  673. </span></li>
  674. </ul>
  675. <li><a name='multidash' href='#multidash top'>  multidash 0,1,1</a><ul>
  676. <li><span style="color:blue;font-size:0.8em"> meaning draw objects no. 2 (circle) and 3 (segments), in the list of command like <em>'multifill points,circle,segments'</em>, are dashed
  677. </span></li>
  678. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  679. </span></li>
  680. <li><span style="color:blue;font-size:0.8em"> if not set all objects will be set 'not dashed'...<br />unless a generic keyword <em>'dashed'</em> was given before command <em>'multidraw'</em>
  681. </span></li>
  682. <li><span style="color:blue;font-size:0.8em"> the dash-type is not -yet- adjustable <br />(e.g. command <em>dashtype line_px,space_px</em> will give no control over multidraw objects)
  683. </span></li>
  684. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check if the number of 0 or 1's matches the amount of draw primitives...
  685. </span></li>
  686. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  687. </span></li>
  688. </ul>
  689. <li><a name='multisnaptogrid' href='#multisnaptogrid top'>  multisnaptogrid 0,1,1</a><ul>
  690. <li><span style="color:blue;font-size:0.8em"> meaning draw objects no. 2 (circle) and 3 (segments), in the list of command like <em>'multifill points,circle,segments'</em>, will snap to the xy-grid (default 1 in x/y-coordinate system: see command <a href='#snaptogrid'>'snaptogrid'</a>)
  691. </span></li>
  692. <li><span style="color:blue;font-size:0.8em"> only the x-values snap_to_grid: <em>multisnaptogrid 0,2,2</em>
  693. </span></li>
  694. <li><span style="color:blue;font-size:0.8em"> only the y-values snap_to_grid: <em>multisnaptogrid 0,3,3</em>
  695. </span></li>
  696. <li><span style="color:blue;font-size:0.8em"> mixing allowed: <em>multisnaptogrid 1,2,3,0</em> e.g. the first object will snap to the xy-grid, the second draw object will snap to the x-values, the third object will snap to the y-valeus of the grid, the last object may be placed anywhere on the canvas
  697. </span></li>
  698. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  699. </span></li>
  700. <li><span style="color:blue;font-size:0.8em"> if not set all objects will be set 'no snap'...<br />unless a generic command 'snaptogrid' was given before command 'multidraw'
  701. </span></li>
  702. <li><span style="color:blue;font-size:0.8em"> commands <a href='#xsnaptogrid'>'xsnaptogrid'</a>, <a href='#ysnaptogrid'>'ysnaptogrid'</a>, <a href='#snaptofunction'>'snaptofunction'</a> and <a href='#snaptopoints'>'snaptopoints</a> x1,y1,x2,y2...' are <b>not</b> supported at this time
  703. </span></li>
  704. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  705. </span></li>
  706. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check if the number of 0 or 1's matches the amount of draw primitives...
  707. </span></li>
  708. </ul>
  709. <li><a name='multifill' href='#multifill top'>  multifill 0,0,1,0,1,0,0</a><ul>
  710. <li><span style="color:blue;font-size:0.8em"> meaning draw objects no. 3 and 5, in the list of command 'multifill', are filled<br />(if the object is fillable...and not a line,segment,arrow or point...)
  711. </span></li>
  712. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  713. </span></li>
  714. <li><span style="color:blue;font-size:0.8em"> if not set all objects -except point|points- will be set 'not filled'...<br />unless a command 'filled' was given before command 'multifill'
  715. </span></li>
  716. <li><span style="color:blue;font-size:0.8em"> only suitable for draw_primitives like 'circle | circles' , 'triangle | triangles' and 'polygon'
  717. </span></li>
  718. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check if the number of 0 or 1's matches the amount of draw primitives...
  719. </span></li>
  720. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  721. </span></li>
  722. </ul>
  723. <li><a name='multistrokecolors' href='#multistrokecolors top'>  multistrokecolors color_name_1,color_name_2,...,color_name_8</a><ul>
  724. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  725. </span></li>
  726. <li><span style="color:blue;font-size:0.8em"> if not set all colors will be 'stroke_color' , 'stroke_opacity'
  727. </span></li>
  728. <li><span style="color:blue;font-size:0.8em"> use these up to 6 colors for the draw primitives used by command <em>'multidraw obj_type_1,obj_type_2...obj_type_7</em>
  729. </span></li>
  730. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check if the number of colours matches the amount of draw primitives...
  731. </span></li>
  732. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  733. </span></li>
  734. </ul>
  735. <li><a name='multifillcolors' href='#multifillcolors top'>  multifillcolors color_name_1,color_name_2,...,color_name_8</a><ul>
  736. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  737. </span></li>
  738. <li><span style="color:blue;font-size:0.8em"> if not set all fillcolors (for circle | triangle | poly[3-9] | closedpoly ) will be 'stroke_color' , 'fill_opacity'
  739. </span></li>
  740. <li><span style="color:blue;font-size:0.8em"> use these up to 6 colors for the draw primitives used by command 'multidraw obj_type_1,obj_type_2...obj_type_n
  741. </span></li>
  742. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check if the number of colours matches the amount of draw primitives...
  743. </span></li>
  744. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  745. </span></li>
  746. </ul>
  747. <li><a name='multiuserinput' href='#multiuserinput top'>  multiuserinput 0,1,1,0</a><ul>
  748. <li><span style="color:blue;font-size:0.8em"> meaning, when the command 'multidraw' is used <br />multidraw circles,points,lines,triangles<br />objects 'points' and 'lines' may additionally be 'drawn' by direct input (inputfields)<br/>all other objects must be drawn with a mouse
  749. </span></li>
  750. <li><span style="color:blue;font-size:0.8em"> in case of circle | circles a third inputfield for Radius (R) is added.<br />the radius must be in the x/y coordinate system (x-range) and <b>not</b> in pixels...students don't think in pixels.<br />note: R-values will not snap-to-grid
  751. </span></li>
  752. <li><span style="color:blue;font-size:0.8em"> in case of line(s) | segment(s) | arrow(s) the user should write <b>x1:y1</b> in the first inputfield and <b/>x2:y2</b> in the second.<br />These 'hints' are pre-filled into the input field.<br />other coordinate delimiters are ";" and "," e.g. <b>x1;y1</b> or <b>x1,y1</b>.<br />An error message (alert box) will popup when things are not correctly...
  753. </span></li>
  754. <li><span style="color:blue;font-size:0.8em"> in case of a triangle | poly3, three inputfields are provided.
  755. </span></li>
  756. <li><span style="color:blue;font-size:0.8em"> may be styled using command <a href="#inputstyle">"inputstyle"</a>
  757. </span></li>
  758. <li><span style="color:blue;font-size:0.8em"> an additional button 'stop drawing' may be used to combine userbased drawings with 'drag&amp;drop' or 'onclick' elements
  759. </span></li>
  760. <li><span style="color:blue;font-size:0.8em"> when exercise if finished (status=done) the buttons will not be shown.<br />To override this default behaviour use command / keyword 'status'
  761. </span></li>
  762. <li><span style="color:blue;font-size:0.8em"> use before command <a href='#multidraw'>'multidraw'</a>
  763. </span></li>
  764. <li><span style="color:blue;font-size:0.8em"> always use the same sequence as is used for 'multidraw'
  765. </span></li>
  766. </ul>
  767. <li><a name='multidraw' href='#multidraw top'>  multidraw obj_type_1,obj_type_2...obj_type_8</a><ul>
  768. <li><span style="color:blue;font-size:0.8em"> for single object user drawings you may also use command <a href="#userdraw">'userdraw'</a>
  769. </span></li>
  770. <li><span style="color:blue;font-size:0.8em"> implemented obj_types:<ul><li>point | points </li><li>circle | circles </li><li>line | lines </li><li>segment | segments </li><li>arrow | arrows <br />use command 'arrowhead int' for size (default value 8 pixels)</li><li>rect | rects </li><li>closedpoly<br />only one closedpolygon may be drawn.The number of 'corner points' is not preset (e.g. not limited,freestyle)<br />the polygone is closed when clicking on the first point again..(+/- 10px) </li><li>triangle | triangles<br />poly3, poly4, ... poly9 | polys3, polys4, ... polys9 <br />(<em>only 3 inputfields for poly*</em>)<br />parallelogram | parallelograms <br />(<em>no inputfields: parallelogram can be used for vector "contructions"</em>)</li></ul>
  771. </span></li>
  772. <li><span style="color:blue;font-size:0.8em"> additionally objects may be user labelled, using obj_type 'text'...<br >in this case allways a text input field and a (x:y) inputfield will be added to the page.<br />use commands 'fontfamily' and 'fontcolor' to adjust. (command 'multistrokeopacity' may be set to adjust text opacity)<br />note: no keyboard listeners are used
  773. </span></li>
  774. <li><span style="color:blue;font-size:0.8em"> it makes no sense using something like "multidraw point,points" ...
  775. </span></li>
  776. <li><span style="color:blue;font-size:0.8em"> note: mouselisteners are only active if "$status != done " (eg only drawing in an active/non-finished exercise) <br /> to overrule use command/keyword "status" (no arguments required)
  777. </span></li>
  778. <li><span style="color:blue;font-size:0.8em"> buttons for changing the obj_type (and incase of 'multiuserinput' , some inputfields and buttons) <br />will be present in the reserved div 'tooltip_div' and can be styled using command 'inputstyle some_css'
  779. </span></li>
  780. <li><span style="color:blue;font-size:0.8em"> the button label will be default the 'object primitive name' (like 'point', 'circles').<br />If you want a different label (e.g. an other language) ,use command 'multilabel'<br />for example in dutch: <br /><em>multilabel cirkel,lijnstuk,punten,STOP<br />multidraw circle,segment,points</em><br />(see command <a href='#multilabel'>'multilabel'</a> for more details)
  781. </span></li>
  782. <li><span style="color:blue;font-size:0.8em"> multidraw is incompatible with command 'tooltip'
  783. </span></li>
  784. <li><span style="color:blue;font-size:0.8em"> all 'multidraw' drawings will scale on zooming.<br />this in contrast to the command <a href="#userdraw">'userdraw'</a>.
  785. </span></li>
  786. <li><span style="color:blue;font-size:0.8em"> wims will <b>not</b> check the amount or validity of your command arguments ! <br />( use javascript console to debug any typo's )
  787. </span></li>
  788. <li><span style="color:blue;font-size:0.8em"> a local function read_canvas%d will read all userbased drawings.<br />The output is always a 9 lines string with fixed sequence.<br/>line 1 = points_x+";"+points_y+"\n"<br/>line 2 = circles_x+";"+circlespoint_y+";"+multi_radius+"\n"<br/>line 3 = segments_x+";"+segments_y+"\n"<br/>line 4 = arrows_x+";"+arrows_y+"\n"<br/>line 5 = lines_x+";"+lines_y+"\n"<br/>line 6 = triangles_x+";"+triangles_y+"\n"<br/>line 7 = rects_x +";"+rects_y+"\n"<br />line 8 = closedpoly_x+";"+closedpoly_y+"\n"<br/>line 9 = text_x+";"+text_y+";"+text"\n"<br/>The x/y-data are in x/y-coordinate system and display precision may be set by a previous command 'precision 0 | 10 | 100 | 1000...'<br />In case of circles the radius is -for the time being- rounded to pixels<br /><b>use the wims "direct exec" tool to see the format of the reply</b>
  789. </span></li>
  790. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: for command argument 'closedpoly' only one polygone can be drawn.<br />The last point (e.g. the point clicked near the first point) of the array is removed.
  791. </span></li>
  792. <li><span style="color:blue;font-size:0.8em"> <em>technical: all 8 'draw primitives' + 'text' will have their own -transparent- PNG bitmap canvas. <br />So for example there can be a points_canvas entirely separated from a line_canvas.<br />This to avoid the need for a complete redraw when something is drawn to the canvas...(eg only the object_type_canvas is redrawn)<br />This in contrast to many very slow do-it-all HTML5 canvas javascript libraries.<br />The mouselisteners are attached to the canvas-div element.</em>
  793. </span></li>
  794. </ul>
  795. <li><a name='ruler' href='#ruler top'>  ruler x,y,x-width ,y-height,mode</a><ul>
  796. <li><span style="color:blue;font-size:0.8em"> x,y are the initial location
  797. </span></li>
  798. <li><span style="color:blue;font-size:0.8em"> x-width , y-height are the ruler dimensions width &amp; height in xy-coordinate system
  799. </span></li>
  800. <li><span style="color:blue;font-size:0.8em"> the ruler scale is by definition the x-scale, set by command 'xrange'<br />for example: a ruler x-width of 6 will have a scale ranging from 0 to 6
  801. </span></li>
  802. <li><span style="color:blue;font-size:0.8em"> mode : use -1 to set the ruler interactive (eg mouse movement of ruler; drag &amp; rotate)<br />use mode = '0&deg; - 360&deg;' to set the ruler with a static angle of some value
  803. </span></li>
  804. <li><span style="color:blue;font-size:0.8em"> if combined with a protractor, use replyformat = 32
  805. </span></li>
  806. <li><span style="color:blue;font-size:0.8em"> only one ruler allowed (for the time being)
  807. </span></li>
  808. <li><span style="color:blue;font-size:0.8em"> when using command 'zoom' , pay <b>attention</b> to the size and symmetry of your canvas<br />...to avoid a partial image, locate the start position near the center of the visual canvas<br /><em>technical:<br /> the actual 'ruler' is just a static generated image in a new canvas-memory<br />This image is only generated once, and a copy of its bitmap is translated & rotated onto the visible canvas.<br />That is the reason for the 'high-speed dragging and rotating'.<br />I've limited its size to xsize &times; ysize e.g. the same size as the visual canvas... </em>
  809. </span></li>
  810. <li><span style="color:blue;font-size:0.8em"> usage: first left click on the ruler will activate dragging;<br />a second left click will activate rotating (just move mouse around)<br />a third click will freeze this position and the x/y-coordinate and angle in radians will be stored in reply(3)<br />a next click will restart this sequence...
  811. </span></li>
  812. </ul>
  813. <li><a name='protractor' href='#protractor top'>  protractor x,y,x_width,type,mode,use_a_scale</a><ul>
  814. <li><span style="color:blue;font-size:0.8em"> x,y are the initial location
  815. </span></li>
  816. <li><span style="color:blue;font-size:0.8em"> x_width : give the width in x-coordinate system (e.g. not in pixels !)
  817. </span></li>
  818. <li><span style="color:blue;font-size:0.8em"> type = 1 : a triangle range 0 - 180<br />type = 2 : a circle shape 0 - 360
  819. </span></li>
  820. <li><span style="color:blue;font-size:0.8em"> mode : use -1 to set the protractor interactive (mouse movement of protractor)<br />use mode = '0&deg; - 360&deg;' to set the protractor with a static angle of some value
  821. </span></li>
  822. <li><span style="color:blue;font-size:0.8em"> if the value of the user_rotation angle is to be shown...use command <a href='#display'>display degree,color,fontsize</a><a href='#display'>display radian,color,fontsize</a>
  823. </span></li>
  824. <li><span style="color:blue;font-size:0.8em"> use_scale = 1 : the protractor will have some scale values printed; use_scale=0 to disable
  825. </span></li>
  826. <li><span style="color:blue;font-size:0.8em"> the rotating direction of the mouse around the protractor determines the clockwise/ counter clockwise rotation of the protractor...
  827. </span></li>
  828. <li><span style="color:blue;font-size:0.8em"> commands <em>stroke_color | fill_color | linewidth | opacity | font_family</em> will determine the looks of the protractor.
  829. </span></li>
  830. <li><span style="color:blue;font-size:0.8em"> default replyformat: reply[0] = x;reply[1] = y;reply[2] = angle_in_radians<br />use command 'precision' to set the reply precision.
  831. </span></li>
  832. <li><span style="color:blue;font-size:0.8em"> if combined with a ruler, use replyformat = 32
  833. </span></li>
  834. <li><span style="color:blue;font-size:0.8em"> command <em>snap_to_grid</em> may be used to assist the pupil at placing the protractor
  835. </span></li>
  836. <li><span style="color:blue;font-size:0.8em"> when using command 'zoom' , pay <b>attention</b> to the size and symmetry of your canvas<br />...to avoid a partial image, locate the start position near the center of the visual canvas<br /><em>technical:<br /> the actual 'protractor' is just a static generated image in a new canvas-memory<br />This image is only generated once, and a copy of its bitmap is translated & rotated onto the visible canvas.<br />That is the reason for the 'high-speed dragging and rotating'.<br />I've limited its size to xsize &times; ysize e.g. the same size as the visual canvas... </em>
  837. </span></li>
  838. <li><span style="color:blue;font-size:0.8em"> only one protractor allowed (for the time being)
  839. </span></li>
  840. <li><span style="color:blue;font-size:0.8em"> usage: first left click on the protractor will activate dragging;<br />a second left click will activate rotating (just move mouse around)<br />a third click will freeze this position and the x/y-coordinate and angle in radians will be stored in reply(3)<br />a next click will restart this sequence...
  841. </span></li>
  842. </ul>
  843. <li><a name='userdraw' href='#userdraw top'>  userdraw object_type,color</a><ul>
  844. <li><span style="color:blue;font-size:0.8em"> only a single object_type is allowed.
  845. </span></li>
  846. <li><span style="color:blue;font-size:0.8em"> for multiple object user drawings use command <a href="#multidraw">'multidraw'</a>
  847. </span></li>
  848. <li><span style="color:blue;font-size:0.8em"> implemented object_type: <ul><li>point</li><li>points</li><li>crosshair</li><li>crosshairs</li><li>line</li><li>lines</li><li>vline</li><li>vlines</li><li>hline</li><li>hlines</li><li>demiline</li><li>demilines</li><li>segment</li><li>segments</li><li>polyline | brokenline </li><li>circle</li><li>circles</li><li>arrow</li><li>arrow2 (double arrow)</li><li>arrows</li><li>arrows2 (double arrows)</li><li>triangle</li><li>polygon</li><li>poly[3-9] (e.g poly3 ... poly7...poly9 </li><li>rect</li><li>roundrect</li><li>rects</li><li>roundrects</li><li>freehandline | path</li><li>freehandlines | paths</li><li>clickfill : fill the clicked area with a color<br />the click may be set <a href="#snaptogrid">snapped...</a></ br>only one area can be selected <br />use command <a href="#canvastype">'canvastype'</a> to fill another canvas (default should be fine: DRAG_CANVAS = 5)</li><li>text</li><li>arc</li><li>arcs</li><li>input<br/>place a single inputfield on 'canvas'<br />use commands 'inputstyle' for css styling: use command 'linewidth' for adjusting the input field size (default 1)</li><li>inputs<br/>place multiple inputfield : placing inputfields on top of each other is not possible</li></ul>
  849. </span></li>
  850. <li><span style="color:blue;font-size:0.8em"> note: mouselisteners are only active if "$status != done " (eg only drawing in an active/non-finished exercise) <br /> to overrule use command/keyword "status" (no arguments required)
  851. </span></li>
  852. <li><span style="color:blue;font-size:0.8em"> note: object_type text: Any string or multiple strings may be placed anywhere on the canvas.<br />"backspace / delete / esc" will remove typed text if the mouse is clicked non the text.<br />You will need to hit "enter" to add the text to the array "userdraw_txt"<br />Placing the cursor somewhere on a typed text and hitting "delete/backspace/esc" ,
  853. </span></li>
  854. </ul>
  855. <li><a name='note:' href='#note: top'>  note: object_type polygone: Will be finished (the object is closed) when clicked on the first point of the polygone again.</a><ul>
  856. <li><span style="color:blue;font-size:0.8em"> note: all objects will be removed -after a javascript confirm box- when clicked on an object point with middle or right mouse button (e.g. event.which != 1 : all buttons but left)
  857. </span></li>
  858. <li><span style="color:blue;font-size:0.8em"> use command "filled", "opacity int,int" and "fillcolor color" to trigger coloured filling of fillable objects
  859. </span></li>
  860. <li><span style="color:blue;font-size:0.8em"> use command "dashed" and/or "dashtype int,int" to trigger dashing
  861. </span></li>
  862. <li><span style="color:blue;font-size:0.8em"> use command "replyformat int" to control / adjust output formatting of javascript function read_canvas();
  863. </span></li>
  864. <li><span style="color:blue;font-size:0.8em"> may be combined with onclick or drag xy of other components of flyscript objects (although not very usefull...)
  865. </span></li>
  866. <li><span style="color:blue;font-size:0.8em"> may be combined with keyword 'userinput_xy'
  867. </span></li>
  868. <li><span style="color:blue;font-size:0.8em"> note: when zooming / panning after a drawing, the drawing will NOT be zoomed / panned...this is a "design" flaw and not a feature <br />To avoid trouble do not use zooming / panning together width userdraw.!<br />use command <a href="#multidraw">multidraw</a> is this is a problem for you...
  869. </span></li>
  870. </ul>
  871. <li><a name='snaptofunction' href='#snaptofunction top'>  snaptofunction some_function_in_x,some_funtion_in_y</a><ul>
  872. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='snaptofun' href='#snaptofun top'>snaptofun</a></span></li>
  873. <li><span style="color:blue;font-size:0.8em"> the next object will snap to the calculated values
  874. </span></li>
  875. <li><span style="color:blue;font-size:0.8em"> if you want only modification of y-values,just use: snaptofunction x,5*sin(1/y)
  876. </span></li>
  877. <li><span style="color:blue;font-size:0.8em"> if you want only modification of x-values,just use: snaptofunction 5*sin(1/x),y
  878. </span></li>
  879. <li><span style="color:blue;font-size:0.8em"> for now only one instance of 'snaptofunction' is allowed
  880. </span></li>
  881. <li><span style="color:blue;font-size:0.8em"> use rawmath on your functions: no validity checking is done by wims !
  882. </span></li>
  883. <li><span style="color:blue;font-size:0.8em"> example:<br />....<br />snaptofunction 5*(cos(x),4*sin(y)<br />linewidth 3<br />userdraw points,blue<br />....<br />
  884. </span></li>
  885. <li><span style="color:blue;font-size:0.8em"> example : switching x and y coordinates?<br />snaptofunction y,x
  886. </span></li>
  887. </ul>
  888. <li><a name='snaptopoints' href='#snaptopoints top'>  snaptopoints x1,y1,x2,y2,x3,y3....</a><ul>
  889. <li><span style="color:blue;font-size:0.8em"> a userdraw object will snap to these points.
  890. </span></li>
  891. <li><span style="color:blue;font-size:0.8em"> the array size (e.g. the number of points) of command 'snaptopoints' is limited by constant MAX_INT (canvasdraw.h)
  892. </span></li>
  893. <li><span style="color:blue;font-size:0.8em"> a draggable object (use command "drag x|y|xy") will snap to the clossed of these points when dragged (mouseup)
  894. </span></li>
  895. <li><span style="color:blue;font-size:0.8em"> other options: use keyword "snaptogrid", "xsnaptogrid" or "ysnaptogrid"
  896. </span></li>
  897. </ul>
  898. <li><a name='snaptogrid' href='#snaptogrid top'>  snaptogrid</a><ul>
  899. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  900. </span></li>
  901. <li><span style="color:blue;font-size:0.8em"> a draggable object (use command "drag x|y|xy") will snap to the given grid when dragged (mouseup)
  902. </span></li>
  903. <li><span style="color:blue;font-size:0.8em"> in case of userdraw the drawn points will snap to xmajor / ymajor grid
  904. </span></li>
  905. <li><span style="color:blue;font-size:0.8em"> if no grid is defined ,points will snap to every integer xrange/yrange value. (eg snap_x=1,snap_y=1)
  906. </span></li>
  907. <li><span style="color:blue;font-size:0.8em"> if you do not want a visible grid, but you only want a 'snaptogrid' with some value...define this grid with opacity 0.
  908. </span></li>
  909. <li><span style="color:blue;font-size:0.8em"> if xminor / yminor is defined,(use keyword 'axis' to activate the minor steps) the drawing will snap to xminor and yminor<br />use only even dividers in x/y-minor...for example<br />snaptogrid<br />axis<br />grid 2,1,grey,4,4,7,red<br /> will snap on x=0, x=0.5, x=1, x=1.5 ....<br /> will snap on y=0, y=0.25 y=0.5 y=0.75 ...<br />
  910. </span></li>
  911. </ul>
  912. <li><a name='xsnaptogrid' href='#xsnaptogrid top'>  xsnaptogrid</a><ul>
  913. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  914. </span></li>
  915. <li><span style="color:blue;font-size:0.8em"> a draggable object (use command "drag x|y|xy") will snap to the given x-grid values when dragged (mouseup)
  916. </span></li>
  917. <li><span style="color:blue;font-size:0.8em"> in case of userdraw the drawn points will snap to xmajor grid
  918. </span></li>
  919. <li><span style="color:blue;font-size:0.8em"> if no grid is defined ,points will snap to every integer xrange value. (eg snap_x=1)
  920. </span></li>
  921. <li><span style="color:blue;font-size:0.8em"> if you do not want a visible grid, but you only want a 'snaptogrid' with some value...define this grid with opacity 0.
  922. </span></li>
  923. <li><span style="color:blue;font-size:0.8em"> if xminor is defined (use keyword 'axis' to activate xminor), the drawing will snap to xminor <br />use only even dividers in x-minor...for example<br />xsnaptogrid<br />axis<br />grid 2,1,grey,4,4,7,red<br /> will snap on x=0, x=0.5, x=1, x=1.5 ....<br /> will snap on y=0, y=0.25 y=0.5 y=0.75 ...<br />
  924. </span></li>
  925. </ul>
  926. <li><a name='ysnaptogrid' href='#ysnaptogrid top'>  ysnaptogrid</a><ul>
  927. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  928. </span></li>
  929. <li><span style="color:blue;font-size:0.8em"> a draggable object (use command "drag x|y|xy") will snap to the given y-grid values when dragged (mouseup)
  930. </span></li>
  931. <li><span style="color:blue;font-size:0.8em"> in case of userdraw the drawn points will snap to ymajor grid
  932. </span></li>
  933. <li><span style="color:blue;font-size:0.8em"> if no grid is defined ,points will snap to every integer yrange value. (eg snap_y=1)
  934. </span></li>
  935. <li><span style="color:blue;font-size:0.8em"> if you do not want a visible grid, but you only want a 'snaptogrid' with some value...define this grid with opacity 0.
  936. </span></li>
  937. <li><span style="color:blue;font-size:0.8em"> if yminor is defined (use keyword 'axis' to activate yminor), the drawing will snap to yminor <br />use only even dividers in y-minor...for example<br />ysnaptogrid<br />axis<br />grid 2,1,grey,4,4,7,red<br /> will snap on x=0, x=0.5, x=1, x=1.5 ....<br /> will snap on y=0, y=0.25 y=0.5 y=0.75 ...<br />
  938. </span></li>
  939. </ul>
  940. <li><a name='userinput' href='#userinput top'>  userinput function | textarea | inputfield</a><ul>
  941. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='userinput_function' href='#userinput_function top'>userinput_function</a></span></li>
  942. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='userinput_textarea' href='#userinput_textarea top'>userinput_textarea</a></span></li>
  943. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='userinput_xy' href='#userinput_xy top'>userinput_xy</a></span></li>
  944. <li><span style="color:blue;font-size:0.8em"> textarea and inputfield are only usable in combination with some 'userdraw draw_ type'
  945. </span></li>
  946. <li><span style="color:blue;font-size:0.8em"> function may be used any time (e.g. without userdraw)
  947. </span></li>
  948. <li><span style="color:blue;font-size:0.8em"> multiple 'userinput function' commands may be used.
  949. </span></li>
  950. <li><span style="color:blue;font-size:0.8em"> use command "functionlabel some_string" to define the inputfield text : default value "f(x)="
  951. </span></li>
  952. <li><span style="color:blue;font-size:0.8em"> use command 'strokecolor some_color' to adjust the plot / functionlabel color
  953. </span></li>
  954. <li><span style="color:blue;font-size:0.8em"> use command 'inputstyle some_css' to adjust the inputfields
  955. </span></li>
  956. <li><span style="color:blue;font-size:0.8em"> use command 'fontsize int' to adjust the label fonts. (default 12px)
  957. </span></li>
  958. <li><span style="color:blue;font-size:0.8em"> the user input for the function will be corrected by a simple 'rawmath' implementation...<br />an error message will be shown if javascript can not interpret the user input
  959. </span></li>
  960. </ul>
  961. <li><a name='usertextarea_xy' href='#usertextarea_xy top'>  usertextarea_xy</a><ul>
  962. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  963. </span></li>
  964. <li><span style="color:blue;font-size:0.8em"> to be used in combination with command "userdraw object_type,color" wherein object_type is only segment / polyline for the time being...
  965. </span></li>
  966. <li><span style="color:blue;font-size:0.8em"> if set two textareas are added to the document<br />(one for x-values , one for y-values)
  967. </span></li>
  968. <li><span style="color:blue;font-size:0.8em"> the student may use this as correction for (x:y) on a drawing (or to draw without mouse, using just the coordinates)
  969. </span></li>
  970. <li><span style="color:blue;font-size:0.8em"> user drawings will not zoom on zooming (or pan on panning)
  971. </span></li>
  972. <li><span style="color:blue;font-size:0.8em"> use command 'inputstyle some_css' to adjust the inputarea.
  973. </span></li>
  974. <li><span style="color:blue;font-size:0.8em"> use command 'fontsize int' to adjust the text labels (if needed)
  975. </span></li>
  976. </ul>
  977. <li><a name='userinput_xy' href='#userinput_xy top'>  userinput_xy</a><ul>
  978. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  979. </span></li>
  980. <li><span style="color:blue;font-size:0.8em"> to be used in combination with command "userdraw object_type,color"
  981. </span></li>
  982. <li><span style="color:blue;font-size:0.8em"> if set two (or three) input fields are added to the document<br />(one for x-values , one for y-values and in case of drawing circle one for radius-values)
  983. </span></li>
  984. <li><span style="color:blue;font-size:0.8em"> the student may use this as correction for (x:y) on a drawing (or to draw without mouse, using just the coordinates)
  985. </span></li>
  986. <li><span style="color:blue;font-size:0.8em"> math input is allowed (e.g something like: 1+3,2*6,1/3,sqrt(3), sin(pi/4),10^-2,log(2)...)<br />eval function is 'protected' against code injection.
  987. </span></li>
  988. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be combined with command "intooltip tiptext" <br />note: the 'tooltip div element' is used for placing inputfields
  989. </span></li>
  990. <li><span style="color:blue;font-size:0.8em"> user drawings will not zoom on zooming (or pan on panning)
  991. </span></li>
  992. <li><span style="color:blue;font-size:0.8em"> use command 'inputstyle some_css' to adjust the inputarea.
  993. </span></li>
  994. <li><span style="color:blue;font-size:0.8em"> use command 'fontsize int' to adjust the text labels (if needed)
  995. </span></li>
  996. </ul>
  997. <li><a name='functionlabel' href='#functionlabel top'>  functionlabel 'some string'</a><ul>
  998. <li><span style="color:blue;font-size:0.8em"> default value "f(x)="
  999. </span></li>
  1000. <li><span style="color:blue;font-size:0.8em"> no mathml allowed (just ascii string)
  1001. </span></li>
  1002. <li><span style="color:blue;font-size:0.8em"> use command 'fontsize int' to adjust the size
  1003. </span></li>
  1004. <li><span style="color:blue;font-size:0.8em"> use command 'strokecolor colorname' to adjust the labels (individually, if needed)
  1005. </span></li>
  1006. <li><span style="color:blue;font-size:0.8em"> if needed, use before every command 'userinput function | inputfield | textarea'
  1007. </span></li>
  1008. </ul>
  1009. <li><a name='userinput_function' href='#userinput_function top'>  userinput_function</a><ul>
  1010. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1011. </span></li>
  1012. <li><span style="color:blue;font-size:0.8em"> if set , a inputfield will be added to the page
  1013. </span></li>
  1014. <li><span style="color:blue;font-size:0.8em"> repeat keyword for more function input fields
  1015. </span></li>
  1016. <li><span style="color:blue;font-size:0.8em"> the userinput value will be plotted in the canvas
  1017. </span></li>
  1018. <li><span style="color:blue;font-size:0.8em"> this value may be read with 'read_canvas()'. <br />for do it yourself js-scripters : If this is the first inputfield in the script, its id is canvas_input0
  1019. </span></li>
  1020. <li><span style="color:blue;font-size:0.8em"> use before this command 'userinput_function',<br />commands like 'inputstyle some_css' , 'xlabel some_description' , 'opacity int,int' , 'linewidth int' , 'dashed' and 'dashtype int,int' to modify
  1021. </span></li>
  1022. <li><span style="color:blue;font-size:0.8em"> fontsize can be set using command 'fontsize int'
  1023. </span></li>
  1024. <li><span style="color:blue;font-size:0.8em"> incompatible with command 'intooltip link_text_or_image' : it uses the tooltip div for adding the inputfield
  1025. </span></li>
  1026. </ul>
  1027. <li><a name='plotsteps' href='#plotsteps top'>  plotsteps a_number</a><ul>
  1028. <li><span style="color:blue;font-size:0.8em"> default 150
  1029. </span></li>
  1030. <li><span style="color:blue;font-size:0.8em"> only used for commands <a href="#curve">"curve / plot"</a> and <a href="#levelcurve">"levelcurve"</a>
  1031. </span></li>
  1032. <li><span style="color:blue;font-size:0.8em"> use with care !
  1033. </span></li>
  1034. </ul>
  1035. <li><a name='fontsize' href='#fontsize top'>  fontsize font_size</a><ul>
  1036. <li><span style="color:blue;font-size:0.8em"> default value 12
  1037. </span></li>
  1038. <li><span style="color:blue;font-size:0.8em"> note:for some macro's (like grid | legend | xaxistext | xlabel etc) sometimes command <a href="#fontfamily">"fontfamily"</a> can be used for some specific font-setting<br />this is however not always very straight forward...so just try and see what happens
  1039. </span></li>
  1040. </ul>
  1041. <li><a name='fontcolor' href='#fontcolor top'>  fontcolor color</a><ul>
  1042. <li><span style="color:blue;font-size:0.8em"> color: hexcolor or colorname
  1043. </span></li>
  1044. <li><span style="color:blue;font-size:0.8em"> default: black
  1045. </span></li>
  1046. <li><span style="color:blue;font-size:0.8em"> example usage: x/y-axis text
  1047. </span></li>
  1048. </ul>
  1049. <li><a name='jscurve' href='#jscurve top'>  jscurve color,formula(x)</a><ul>
  1050. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='jsplot' href='#jsplot top'>jsplot</a></span></li>
  1051. <li><span style="color:blue;font-size:0.8em"> your function will be plotted by the javascript engine of the client browser.
  1052. </span></li>
  1053. <li><span style="color:blue;font-size:0.8em"> use only basic math in your curve:<br /> sqrt,^,asin,acos,atan,log,pi,abs,sin,cos,tan,e
  1054. </span></li>
  1055. <li><span style="color:blue;font-size:0.8em"> use parenthesis and rawmath : use 2*x instead of 2x ; use 2^(sin(x))...etc etc<br />use error console to debug any errors...
  1056. </span></li>
  1057. <li><span style="color:blue;font-size:0.8em"> <b>attention</b> : last "precision" command in the canvasdraw script determines the calculation precision of the javascript curve plot !
  1058. </span></li>
  1059. <li><span style="color:blue;font-size:0.8em"> no validity check is done by wims.
  1060. </span></li>
  1061. <li><span style="color:blue;font-size:0.8em"> zooming & panning are implemented :<br />use command 'zoom color' for mouse driven zooming<br />or use keyword 'setlimits' for inputfields setting xmin/xmax, ymin/ymax
  1062. </span></li>
  1063. <li><span style="color:blue;font-size:0.8em"> zooming & panning is better than for curves produced by command <a href="#curve">curve color,formula</a> because for avery change in x/y-range the curve is recalculated in javascript
  1064. </span></li>
  1065. <li><span style="color:blue;font-size:0.8em"> use command 'trace_jscurve formula(x)` for tracing
  1066. </span></li>
  1067. <li><span style="color:blue;font-size:0.8em"> use command 'jsmath formula(x)` for calculating and displaying indiviual points on the curve
  1068. </span></li>
  1069. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> (yet)
  1070. </span></li>
  1071. <li><span style="color:blue;font-size:0.8em"> commands plotjump / plotstep are not active for 'jscurve'
  1072. </span></li>
  1073. <li><span style="color:blue;font-size:0.8em"> every command jscurve will produce a new canvas (canvastype 111,112,113...) for this one curve.
  1074. </span></li>
  1075. <li><span style="color:blue;font-size:0.8em"> plotting multiple js-curves on the same canvas <br/>(for example if you want to use 'userdraw clickfill,color' on <a href="#canvastype">canvastype</a> number 111 ,use :<br/> jscurve red,fun1(x),fun2(x)...fun_n(x)<br /> you want to specify individual colors | opacity | linewidth for these multiple js-curves.<br />use commands like: <a href="#multistrokecolors">multistrokecolors</a>,<a href="#multilinewidth">multilinewidth</a>, <a href="#multidash">multidash</a><br />, <a href="multistrokeopacity">multistroke</a><br />the <b>color</b> given for the command "jscurve <b>color</b>,formulas(x)" will not be used in that case...<br />but the color argument must still be given in any case (otherwise syntax error...)
  1076. </span></li>
  1077. </ul>
  1078. <li><a name='curve' href='#curve top'>  curve color,formula(x)</a><ul>
  1079. <li><span style="color:blue;font-size:0.8em"> alernative : plot color,formula(x)
  1080. </span></li>
  1081. <li><span style="color:blue;font-size:0.8em"> use command <a href="#trange">trange</a> in parametric functions before command curve / plot (trange -pi,pi)<br />curve color,formula1(t),formula2(t)
  1082. </span></li>
  1083. <li><span style="color:blue;font-size:0.8em"> use command <a href="#precision">"precision" </a>to ncrease the number of digits of the plotted points
  1084. </span></li>
  1085. <li><span style="color:blue;font-size:0.8em"> use command <a href="#plotsteps">"plotsteps"</a> to increase / decrease the amount of plotted points (default 150)
  1086. </span></li>
  1087. <li><span style="color:blue;font-size:0.8em"> may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
  1088. </span></li>
  1089. <li><span style="color:blue;font-size:0.8em"> if you need a plot beyond xrange / yrange, use <a href="#jsplot">"jsplot"'</a><br />(command "curve" will only calculate points within the xrange)
  1090. </span></li>
  1091. </ul>
  1092. <li><a name='levelcurve' href='#levelcurve top'>  levelcurve color,expression in x/y,l1,l2,...</a><ul>
  1093. <li><span style="color:blue;font-size:0.8em"> draws very primitive level curves for expression, with levels l1,l2,l3,...,l_n
  1094. </span></li>
  1095. <li><span style="color:blue;font-size:0.8em"> the quality is <b>not to be compared</b> with the Flydraw levelcurve. <br />(choose flydraw if you want quality...)
  1096. </span></li>
  1097. <li><span style="color:blue;font-size:0.8em"> every individual level curve may be set 'onclick / drag xy' <br />e.g. every single level curve (l1,l2,l3...l_n) has a unique identifier
  1098. </span></li>
  1099. <li><span style="color:blue;font-size:0.8em"> note : the arrays for holding the javascript data are limited in size
  1100. </span></li>
  1101. <li><span style="color:blue;font-size:0.8em"> note : reduce image size if javascript data arrays get overloaded<br />(command 'plotsteps int' will not control the data size of the plot...)
  1102. </span></li>
  1103. </ul>
  1104. <li><a name='bezier' href='#bezier top'>  bezier color,x_start,y_start,x_first,y_first,x_second,y_second,x_end,y_end</a><ul>
  1105. <li><span style="color:blue;font-size:0.8em"> draw a bezier curve between points, starting from (x_start:y_start)
  1106. </span></li>
  1107. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be dragged or set onclick
  1108. </span></li>
  1109. </ul>
  1110. <li><a name='trace_jscurve' href='#trace_jscurve top'>  trace_jscurve some_math_function</a><ul>
  1111. <li><span style="color:blue;font-size:0.8em"> will use a crosshair to trace the jsmath curve
  1112. </span></li>
  1113. <li><span style="color:blue;font-size:0.8em"> two inputfields will display the current x/y-values (numerical evaluation by javascript)
  1114. </span></li>
  1115. <li><span style="color:blue;font-size:0.8em"> default labels 'x' and 'y'<br />use commands 'xlabel some_x_axis_name' and 'ylabel some_y_axis_name' to customize the labels for the input fields
  1116. </span></li>
  1117. <li><span style="color:blue;font-size:0.8em"> use commands fontsize and inputstyle to format the fonts for labels and inputfields.
  1118. </span></li>
  1119. <li><span style="color:blue;font-size:0.8em"> use commands linewidth,strokecolor,crosshairsize to adjust the corsshair.
  1120. </span></li>
  1121. <li><span style="color:blue;font-size:0.8em"> the client browser will convert your math function to javascript math.<br />use parenthesis and rawmath : use 2*x instead of 2x etc etc<br />no check is done on the validity of your function and/or syntax<br />use error console to debug any errors...
  1122. </span></li>
  1123. <li><span style="color:blue;font-size:0.8em"> be aware that the formula's of the plotted function(s) can be found in the page javascript source
  1124. </span></li>
  1125. </ul>
  1126. <li><a name='jsmath' href='#jsmath top'>  jsmath some_math_function</a><ul>
  1127. <li><span style="color:blue;font-size:0.8em"> will calculate an y-value from a userinput x-value and draws a crosshair on these coordinates.
  1128. </span></li>
  1129. <li><span style="color:blue;font-size:0.8em"> default labels 'x' and 'y'<br />the commands 'xlabel some_x_axis_name' and 'ylabel some_y_axis_name' will set the label for the input fields
  1130. </span></li>
  1131. <li><span style="color:blue;font-size:0.8em"> use command 'inputstyle some_css' for styling the display fields. Use command 'fontsize int' to size the labels 'x' and 'y'
  1132. </span></li>
  1133. <li><span style="color:blue;font-size:0.8em"> example: jsmath sin(x^2)
  1134. </span></li>
  1135. <li><span style="color:blue;font-size:0.8em"> the client browser will convert your math function to javascript math.<br />use parenthesis and rawmath : use 2*x instead of 2x etc etc<br />no check is done on the validity of your function and/or syntax<br />use error console to debug any errors...
  1136. </span></li>
  1137. <li><span style="color:blue;font-size:0.8em"> be aware that the formula's of the plotted function(s) can be found in the page javascript source
  1138. </span></li>
  1139. </ul>
  1140. <li><a name='text' href='#text top'>  text fontcolor,x,y,font,text_string</a><ul>
  1141. <li><span style="color:blue;font-size:0.8em"> font may be described by keywords : giant,huge,normal,small,tiny
  1142. </span></li>
  1143. <li><span style="color:blue;font-size:0.8em"> use command 'fontsize' to increase base fontsize for these keywords
  1144. </span></li>
  1145. <li><span style="color:blue;font-size:0.8em"> may be set "onclick" or "drag xy"
  1146. </span></li>
  1147. <li><span style="color:blue;font-size:0.8em"> backwards compatible with flydraw
  1148. </span></li>
  1149. <li><span style="color:blue;font-size:0.8em"> unicode supported: text red,0,0,huge,\u2232
  1150. </span></li>
  1151. <li><span style="color:blue;font-size:0.8em"> use command 'string' combined with 'fontfamily' for a more fine grained control over html5 canvas text element
  1152. </span></li>
  1153. <li><span style="color:blue;font-size:0.8em"> Avoid mixing old flydraw commands 'text' 'textup' with new canvasdraw commands 'string' stringup'<br />If the fontfamily was set completely like "fontfamily italic 24px Ariel".<br />In that case reset 'fontfamily' to something lke 'fontfamily Ariel' before the old flydraw commands.
  1154. </span></li>
  1155. </ul>
  1156. <li><a name='textup' href='#textup top'>  textup fontcolor,x,y,font,text_string</a><ul>
  1157. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set "onclick" or "drag xy" (because of translaton matrix...mouse incompatible)
  1158. </span></li>
  1159. <li><span style="color:blue;font-size:0.8em"> font may be described by keywords : giant,huge,normal,small,tiny
  1160. </span></li>
  1161. <li><span style="color:blue;font-size:0.8em"> use command 'fontsize' to increase base fontsize for the keywords
  1162. </span></li>
  1163. <li><span style="color:blue;font-size:0.8em"> backwards compatible with flydraw
  1164. </span></li>
  1165. <li><span style="color:blue;font-size:0.8em"> unicode supported: textup red,0,0,huge,\u2232
  1166. </span></li>
  1167. <li><span style="color:blue;font-size:0.8em"> use command 'stringup' and 'fontfamily' for a more fine grained control over html5 canvas text element
  1168. </span></li>
  1169. <li><span style="color:blue;font-size:0.8em"> Avoid mixing old flydraw commands 'text' 'textup' with new canvasdraw commands 'string' stringup'<br />If the fontfamily was set completely like "fontfamily italic 24px Ariel".<br />In that case reset 'fontfamily' to something lke 'fontfamily Ariel' before the old flydraw commands.
  1170. </span></li>
  1171. </ul>
  1172. <li><a name='fontfamily' href='#fontfamily top'>  fontfamily font_description</a><ul>
  1173. <li><span style="color:blue;font-size:0.8em"> set the font family; for browsers that support it
  1174. </span></li>
  1175. <li><span style="color:blue;font-size:0.8em"> font_description: Ariel ,Courier, Helvetica etc
  1176. </span></li>
  1177. <li><span style="color:blue;font-size:0.8em"> in case commands<br /> 'string color,x,y,the string'<br /> 'stringup color,x,y,rotation,the string'<br />fontfamily can be something like:<br />italic 34px Ariel
  1178. </span></li>
  1179. <li><span style="color:blue;font-size:0.8em"> use correct syntax : 'font style' 'font size'px 'fontfamily'
  1180. </span></li>
  1181. </ul>
  1182. <li><a name='stringup' href='#stringup top'>  stringup color,x,y,rotation_degrees,the text string</a><ul>
  1183. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set "onclick" or "drag xy" (because of translaton matrix...mouse incompatible)
  1184. </span></li>
  1185. <li><span style="color:blue;font-size:0.8em"> unicode supported: stringup red,0,0,45,\u2232
  1186. </span></li>
  1187. <li><span style="color:blue;font-size:0.8em"> use a command like 'fontfamily bold 34px Courier' <br />to set fonts on browser that support font change
  1188. </span></li>
  1189. </ul>
  1190. <li><a name='string' href='#string top'>  string color,x,y,the text string</a><ul>
  1191. <li><span style="color:blue;font-size:0.8em"> may be set "onclick" or "drag xy"
  1192. </span></li>
  1193. <li><span style="color:blue;font-size:0.8em"> unicode supported: string red,0,0,\u2232
  1194. </span></li>
  1195. <li><span style="color:blue;font-size:0.8em"> use a command like 'fontfamily italic 24px Ariel' <br />to set fonts on browser that support font change
  1196. </span></li>
  1197. </ul>
  1198. <li><a name='centerstring' href='#centerstring top'>  centerstring color,y-value,the text string</a><ul>
  1199. <li><span style="color:blue;font-size:0.8em"> title color,y-value,the text string
  1200. </span></li>
  1201. <li><span style="color:blue;font-size:0.8em"> draw a string centered on the canvas at y = y-value
  1202. </span></li>
  1203. <li><span style="color:blue;font-size:0.8em"> can not be set "onclick" or "drag xy" (...)
  1204. </span></li>
  1205. <li><span style="color:blue;font-size:0.8em"> unicode supported: centerstring red,5,\u2232
  1206. </span></li>
  1207. <li><span style="color:blue;font-size:0.8em"> use a command like 'fontfamily italic 24px Ariel' <br />to set fonts on browser that support font change
  1208. </span></li>
  1209. </ul>
  1210. <li><a name='mathml' href='#mathml top'>  mathml x1,y1,x2,y2,mathml_string</a><ul>
  1211. <li><span style="color:blue;font-size:0.8em"> mathml will be displayed in a rectangle left top (x1:y1) , right bottom (x2:y2)
  1212. </span></li>
  1213. <li><span style="color:blue;font-size:0.8em"> can be set onclick <br />(however dragging is not supported)<br />javascript:read_dragdrop(); will return click number of mathml-object
  1214. </span></li>
  1215. <li><span style="color:blue;font-size:0.8em"> if inputfields are incorporated in mathml (with id's : id='mathml0',id='mathml1',...id='mathml_n')<br />the user_input values will be read by javascript:read_mathml();<br /><b>attention</b>: if after this mathml-input object other user-interactions are included, these will read mathml too using "read_canvas();"
  1216. </span></li>
  1217. <li><span style="color:blue;font-size:0.8em"> If other inputfields (command input / command textarea) or userdraw is performed, the function read_canvas() will not read mathml. Use some generic function to read it....
  1218. </span></li>
  1219. </ul>
  1220. <li><a name='http' href='#http top'>  http x1,y1,x2,y2,http://some_adress.com</a><ul>
  1221. <li><span style="color:blue;font-size:0.8em"> an active html-page will be displayed in an "iframe" rectangle left top (x1:y1) , right bottom (x2:y2)
  1222. </span></li>
  1223. <li><span style="color:blue;font-size:0.8em"> do not use interactivity (or mouse) if the mouse needs to be active in the iframe
  1224. </span></li>
  1225. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be 'set onclick' or 'drag xy'
  1226. </span></li>
  1227. </ul>
  1228. <li><a name='html' href='#html top'>  html x1,y1,x2,y2,html_string</a><ul>
  1229. <li><span style="color:blue;font-size:0.8em"> all tags are allowed<br /> html-code using inputfields could be read using your own javascript-code. Do not use id's like 'canvas_input0' etc.
  1230. </span></li>
  1231. <li><span style="color:blue;font-size:0.8em"> can be set onclick <br />(however dragging not supported)
  1232. </span></li>
  1233. </ul>
  1234. <li><a name='noaxis' href='#noaxis top'>  noaxis</a><ul>
  1235. <li><span style="color:blue;font-size:0.8em"> keyword
  1236. </span></li>
  1237. <li><span style="color:blue;font-size:0.8em"> if set, the automatic x-axis numbering will be ignored
  1238. </span></li>
  1239. <li><span style="color:blue;font-size:0.8em"> use command <a href="#axis">axis</a> to have a visual x/y-axis lines (see command <a href="grid">grid</a>
  1240. </span></li>
  1241. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1242. </span></li>
  1243. </ul>
  1244. <li><a name='noayis' href='#noayis top'>  noayis</a><ul>
  1245. <li><span style="color:blue;font-size:0.8em"> keyword
  1246. </span></li>
  1247. <li><span style="color:blue;font-size:0.8em"> if set, the automatic y-axis numbering will be ignored
  1248. </span></li>
  1249. <li><span style="color:blue;font-size:0.8em"> use command <a href="#axis">axis</a> to have a visual x/y-axis lines (see command <a href="grid">grid</a>
  1250. </span></li>
  1251. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1252. </span></li>
  1253. </ul>
  1254. <li><a name='xaxis' href='#xaxis top'>  xaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n</a><ul>
  1255. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='xaxistext' href='#xaxistext top'>xaxistext</a></span></li>
  1256. <li><span style="color:blue;font-size:0.8em"> use these x-axis num1...num_n values instead of default xmin...xmax
  1257. </span></li>
  1258. <li><span style="color:blue;font-size:0.8em"> no need to use keyword <a href="#axisnumbering">axisnumbering</a>
  1259. </span></li>
  1260. <li><span style="color:blue;font-size:0.8em"> use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="grid">grid</a>
  1261. </span></li>
  1262. <li><span style="color:blue;font-size:0.8em"> use command "fontcolor", "fontfamily" to adjust font <br />defaults: black,12,Ariel<br />note: command "fontsize" is not active for this command.("fontsize" can be used for the <a href="#legend">"legend"</a> in a <a href="#grid">grid</a>)
  1263. </span></li>
  1264. <li><span style="color:blue;font-size:0.8em"> a javascript error message will flag non-matching value:name pairs
  1265. </span></li>
  1266. <li><span style="color:blue;font-size:0.8em"> if the 'x-axis words' are too big and will overlap, a simple alternating offset will be applied
  1267. </span></li>
  1268. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1269. </span></li>
  1270. <li><span style="color:blue;font-size:0.8em"> example:<br />size 400,400<br />xrange 0,13<br />yrange -100,500<br />axis<br />xaxis 1:january:2:february:3:march:5:may:6:june:7:july:8:august:9:september:10:october:11:november:12:december<br />#'xmajor' steps should be synchronised with numbers eg. "1" in this example<br />grid 1,100,grey,1,4,6,grey
  1271. </span></li>
  1272. </ul>
  1273. <li><a name='xaxisup' href='#xaxisup top'>  xaxisup num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n</a><ul>
  1274. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='xaxistextup' href='#xaxistextup top'>xaxistextup</a></span></li>
  1275. <li><span style="color:blue;font-size:0.8em"> the text will be rotated 90&deg; up
  1276. </span></li>
  1277. <li><span style="color:blue;font-size:0.8em"> no need to use keyword <a href="#axisnumbering">axisnumbering</a>
  1278. </span></li>
  1279. <li><span style="color:blue;font-size:0.8em"> use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="grid">grid</a>
  1280. </span></li>
  1281. <li><span style="color:blue;font-size:0.8em"> use these x-axis num1...num_n values instead of default xmin...xmax
  1282. </span></li>
  1283. <li><span style="color:blue;font-size:0.8em"> use command "fontcolor","fontfamily" to adjust font <br />defaults: black,12,Ariel<br />note: command "fontsize" is not active for this command.("fontsize" can be used for the <a href="#legend">"legend"</a> in a <a href="#grid">grid</a>)
  1284. </span></li>
  1285. <li><span style="color:blue;font-size:0.8em"> a javascript error message will flag non-matching value:name pairs
  1286. </span></li>
  1287. <li><span style="color:blue;font-size:0.8em"> if the 'x-axis words' are too big, they will overlap the graph<br /> (in this case the text will start from ysize upwards)
  1288. </span></li>
  1289. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1290. </span></li>
  1291. <li><span style="color:blue;font-size:0.8em"> example:<br />size 400,400<br />xrange 0,13<br />yrange -100,500<br />axis<br />xaxisup 1:january:2:february:3:march:5:may:6:june:7:july:8:august:9:september:10:october:11:november:12:december<br />#'xmajor' steps should be synchronised with numbers eg. "1" in this example<br />grid 1,100,grey,1,4,6,grey
  1292. </span></li>
  1293. </ul>
  1294. <li><a name='yaxis' href='#yaxis top'>  yaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n</a><ul>
  1295. <li><span style="color:blue;font-size:0.8em"> alternativ : yaxistext num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
  1296. </span></li>
  1297. <li><span style="color:blue;font-size:0.8em"> use command "fontcolor", "fontfamily" to adjust font <br />defaults: black,12,Ariel<br /> note: command "fontsize" is not active for this command.("fontsize" can be used for the <a href="#legend">"legend"</a> in a <a href="#grid">grid</a>)
  1298. </span></li>
  1299. <li><span style="color:blue;font-size:0.8em"> no need to use keyword <a href="#axisnumbering">axisnumbering</a>
  1300. </span></li>
  1301. <li><span style="color:blue;font-size:0.8em"> use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="grid">grid</a>
  1302. </span></li>
  1303. <li><span style="color:blue;font-size:0.8em"> use these y-axis num1...num_n values instead of default ymin...ymax
  1304. </span></li>
  1305. <li><span style="color:blue;font-size:0.8em"> a javascript error message will flag non-matching value:name pairs
  1306. </span></li>
  1307. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1308. </span></li>
  1309. <li><span style="color:blue;font-size:0.8em"> example:<br />size 400,400<br />yrange 0,13<br />xrange -100,500<br />axis<br />yaxis 1:january:2:february:3:march:5:may:6:june:7:july:8:august:9:september:10:october:11:november:12:december<br />#'ymajor' steps should be synchronised with numbers eg. "1" in this example<br />grid 100,1,grey,4,1,6,grey
  1310. </span></li>
  1311. </ul>
  1312. <li><a name='axisnumbering' href='#axisnumbering top'>  axisnumbering</a><ul>
  1313. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1314. </span></li>
  1315. <li><span style="color:blue;font-size:0.8em"> for special numbering of x-axis or y-axis see grid related commands <a href="#axis">axis</a> <a href="#xaxis">xaxis</a> , <a href="#xaxisup">xaxisup</a>, <a href="#noxaxis">noxaxis</a> ,<a href="#yaxis">yaxis</a> , <a href="#yaxisup">yaxisup</a>, <a href="#noyaxis">noyaxis</a>
  1316. </span></li>
  1317. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1318. </span></li>
  1319. </ul>
  1320. <li><a name='axis' href='#axis top'>  axis</a><ul>
  1321. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1322. </span></li>
  1323. <li><span style="color:blue;font-size:0.8em"> to be used before command grid (see <a href="#grid">command grid</a>)
  1324. </span></li>
  1325. </ul>
  1326. <li><a name='killslider' href='#killslider top'>  killslider</a><ul>
  1327. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1328. </span></li>
  1329. <li><span style="color:blue;font-size:0.8em"> ends grouping of object under a previously defined slider
  1330. </span></li>
  1331. </ul>
  1332. <li><a name='sliderfunction_x' href='#sliderfunction_x top'>  sliderfunction_x some_function_in_x</a><ul>
  1333. <li><span style="color:blue;font-size:0.8em"> default value "x"
  1334. </span></li>
  1335. <li><span style="color:blue;font-size:0.8em"> the x-value of the slider object(s) will be calculated with this function.
  1336. </span></li>
  1337. <li><span style="color:blue;font-size:0.8em"> default is the x-slider value itself
  1338. </span></li>
  1339. <li><span style="color:blue;font-size:0.8em"> only used by command 'slider'
  1340. </span></li>
  1341. <li><span style="color:blue;font-size:0.8em"> define before a slider command !
  1342. </span></li>
  1343. </ul>
  1344. <li><a name='sliderfunction_y' href='#sliderfunction_y top'>  sliderfunction_y some_function_in_y</a><ul>
  1345. <li><span style="color:blue;font-size:0.8em"> default value "y"
  1346. </span></li>
  1347. <li><span style="color:blue;font-size:0.8em"> the y-value of the slider object(s) will be calculated with this function.
  1348. </span></li>
  1349. <li><span style="color:blue;font-size:0.8em"> only used by command 'slider'
  1350. </span></li>
  1351. <li><span style="color:blue;font-size:0.8em"> define before a slider command !
  1352. </span></li>
  1353. </ul>
  1354. <li><a name='slider' href='#slider top'>  slider start_value,end_value,width px,height px,<em>type</em>,label</a><ul>
  1355. <li><span style="color:blue;font-size:0.8em"> <em>type</em> may be : xy,x,y,angle
  1356. </span></li>
  1357. <li><span style="color:blue;font-size:0.8em"> if a slider value display is desired, use for argument <em>type</em>:<br />xy display<br />x display<br />y display<br />angle radian<br />angle degree
  1358. </span></li>
  1359. <li><span style="color:blue;font-size:0.8em"> if a unit (or something like that...) for x/y-value display is needed, use commands 'xunit' and / or 'yunit'
  1360. </span></li>
  1361. <li><span style="color:blue;font-size:0.8em"> if the translation should be performed using a function, use for type: xy function,x function,y function<br />use commands sliderfunction_x and/or sliderfunction_y before the slider command to define the functions<br />example:<br />sliderfunction_x x^2<br />sliderfunction_y y^2<br />slider -5,5,100,100,xy function,Some_Text<br />...some stuff to slide<br />killslider<br />sliderfunction_x x^2-2<br />slider -15,15,100,10,x function,Some_Other_Text<br />...more stuff to slide<br />killslider<br />... etc
  1362. </span></li>
  1363. <li><span style="color:blue;font-size:0.8em"> use command 'slider' before draggable/clickable objects.
  1364. </span></li>
  1365. <li><span style="color:blue;font-size:0.8em"> drag and drop may be combined with rotation slider<br />for example an arrow rotated by a slider may be placed anywhere (drag&drop)<em>size 300,300<br />xrange -5,5<br />yrange -5,5<br />grid 1,1,grey<br />linewidth 3<br />drag xy<br />fillcolor orange<br />strokecolor blue<br />slider 0,2*pi,250,30,angle degrees,Rotate arrow<br />arrow 2,2,5,5,8,red</em>
  1366. </span></li>
  1367. <li><span style="color:blue;font-size:0.8em"> no slider for a math function, these can be traced using command 'trace_jscurve some_function_in_x'
  1368. </span></li>
  1369. <li><span style="color:blue;font-size:0.8em"> a slider will affect all draggable objects after the 'slider' command...<br />and can be used to group translate / rotate several objects...<br />until a next 'slider' or keyword 'killslider'
  1370. </span></li>
  1371. <li><span style="color:blue;font-size:0.8em"> amount of sliders is not limited.
  1372. </span></li>
  1373. <li><span style="color:blue;font-size:0.8em"> javascript:read_dragdrop(); will return an array with 'object_number:slider_value'
  1374. </span></li>
  1375. <li><span style="color:blue;font-size:0.8em"> type=xy: will produce a 2D 'slider' [rectangle width x heigh px] in your web page
  1376. </span></li>
  1377. <li><span style="color:blue;font-size:0.8em"> every draggable object may have its own slider (no limit in amount of sliders)
  1378. </span></li>
  1379. <li><span style="color:blue;font-size:0.8em"> label: some slider text
  1380. </span></li>
  1381. <li><span style="color:blue;font-size:0.8em"> use fillcolor for slider ball
  1382. </span></li>
  1383. <li><span style="color:blue;font-size:0.8em"> use strokecolor for slider bar
  1384. </span></li>
  1385. <li><span style="color:blue;font-size:0.8em"> use fontfamily / fontcolor to set used fonts
  1386. </span></li>
  1387. <li><span style="color:blue;font-size:0.8em"> use opacity (only fill opacity will be used) to set transparency
  1388. </span></li>
  1389. <li><span style="color:blue;font-size:0.8em"> the slider canvas will be added to the 'tooltip div' : so incompatible with command tooltip ; setlimits etc
  1390. </span></li>
  1391. </ul>
  1392. <li><a name='sgraph' href='#sgraph top'>  sgraph xstart,ystart,xmajor,ymajor,xminor,yminor,majorgrid_color,minorgrid_color</a><ul>
  1393. <li><span style="color:blue;font-size:0.8em"> primitive implementation of a 'broken scale' graph...
  1394. </span></li>
  1395. <li><span style="color:blue;font-size:0.8em"> not very versatile: only usable in combination with userdraw <br />eg no other objects will obey this "coordinate system"<br />if you want to place an object into this coordinate system, be aware that 10% or 20% of xsize and/or ysize is 'lost'.<br />Use these "formulas" to recalculate the virtual coordinates:<br />factor=0.8 in case xstart != xmin (or ystart != ymin)<br />factor=0.9 in case xstart = xmin (or ystart = ymin)<br />px_x_point = ((factor*xsize)/(xmax - xstart))*(x_point - xmax)+xsize<br />x_recalculated = px*(xmax - xmin)/xsize + $xmin<br />px_y_point = -1*factor*y_point*ysize/(ymax - ystart) + ymax*factor*ysize/(ymax - ystart)<br />y_recalculated = ymax - py*(ymax - ymin)/ysize<br />
  1396. </span></li>
  1397. <li><span style="color:blue;font-size:0.8em"> example:<br />size 400,400<br />xrange 0,10000<br />yrange 0,100<br />sgraph 9000,50,100,10,4,4,grey,blue<br />userinput_xy<br />linewidth 2<br />userdraw segments,red
  1398. </span></li>
  1399. </ul>
  1400. <li><a name='grid' href='#grid top'>  grid step_x,step_y,gridcolor</a><ul>
  1401. <li><span style="color:blue;font-size:0.8em"> if keywords <a href="#axis">"axis"</a> or <a href="#axisnumbering">"axisnumbering"</a> are set, use :<br />grid step_x,step_y,major_color,minor_x,minor_y,tics height in px,axis_color<br />minor x step = step_x / minor_x
  1402. </span></li>
  1403. <li><span style="color:blue;font-size:0.8em"> in that case, use command <a href="#fontcolor">"fontcolor"</a>, <a href="#fontsize">"fontsize"</a> and / or <a href="#fontfamily">"fontfamily"</a> to adjust font <br />defaults: black,12,Ariel
  1404. </span></li>
  1405. <li><span style="color:blue;font-size:0.8em"> if xmin > 0 and/or ymin > 0 and zooming / panning is not activ: <br /> be aware that the x/y-axis numbering and x/y major/minor tic marks will not be visual <br /> as they are placed under the x-axis and left to the y-axis (in Quadrant II and IV)
  1406. </span></li>
  1407. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set <a href="#onclick">"onclick"</a> or <a href="#drag">"drag xy"</a>
  1408. </span></li>
  1409. <li><span style="color:blue;font-size:0.8em"> use commands <a href="#xlabel">'xlabel some_string'</a> and/or <a href="#ylabel">'ylabel some_string'</a> to label axis;<br />use command "fontsize" to adjust size:the font family is non-configurable 'italic your_fontsize px Ariel' !
  1410. </span></li>
  1411. <li><span style="color:blue;font-size:0.8em"> see commands (see <a href="#xaxis">"xaxis" or xaxistext"</a>, <a href="#yaxis">"yaxis" or "yaxistext"</a> to set tailormade values on axis (the used font is set by <a href="fontfamily">command fontfamily</a>; default '12px Ariel')
  1412. </span></li>
  1413. <li><span style="color:blue;font-size:0.8em"> see command <a href="#legend">"legend"</a>to set a legend for the graph ;<br />use command <a href="#fontsize">"fontsize"</a> to adjust size (the font family is non-configurable 'bold your_fontsize px Ariel')
  1414. </span></li>
  1415. </ul>
  1416. <li><a name='opacity' href='#opacity top'>  opacity 0-255,0-255</a><ul>
  1417. <li><span style="color:blue;font-size:0.8em"> opacity 0.0 - 1.0,0.0 - 1.0
  1418. </span></li>
  1419. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='transparent' href='#transparent top'>transparent</a></span></li>
  1420. <li><span style="color:blue;font-size:0.8em"> first item is stroke opacity, second is fill opacity
  1421. </span></li>
  1422. </ul>
  1423. <li><a name='rotationcenter' href='#rotationcenter top'>  rotationcenter x_center,y_center</a><ul>
  1424. <li><span style="color:blue;font-size:0.8em"> define an rotation center in your x/y-coordinate system
  1425. </span></li>
  1426. <li><span style="color:blue;font-size:0.8em"> wims will not check the validity of your input; use javascript console to debug any erors
  1427. </span></li>
  1428. <li><span style="color:blue;font-size:0.8em"> if not defined a rotation will be around the first point of an object
  1429. </span></li>
  1430. <li><span style="color:blue;font-size:0.8em"> to be used before command <a href="#rotate">rotate</a>
  1431. </span></li>
  1432. <li><span style="color:blue;font-size:0.8em"> all other commands will use this rotation center, unless a <a href="#killrotation">killrotation</a> is given
  1433. </span></li>
  1434. </ul>
  1435. <li><a name='rotate' href='#rotate top'>  rotate rotation_angle</a><ul>
  1436. <li><span style="color:blue;font-size:0.8em"> angle in degrees
  1437. </span></li>
  1438. <li><span style="color:blue;font-size:0.8em"> (only) the next object will be rotated is given angle
  1439. </span></li>
  1440. <li><span style="color:blue;font-size:0.8em"> positive values rotate counter clockwise
  1441. </span></li>
  1442. <li><span style="color:blue;font-size:0.8em"> attention: all objects will be rotated around their first point...<br /><em>rotate 45</em><br /> <em>triangle 1,1,5,1,3,4,red</em><br />will rotate 45 degrees around point (1:1)
  1443. </span></li>
  1444. <li><span style="color:blue;font-size:0.8em"> if another rotation center is needed, use command <a href="#rotationcenter">'rotationcenter xc,yc'</a>.<br />to reset this rotationcenter, use keyword <a href="killrotate">'killrotate'</a>
  1445. </span></li>
  1446. <li><span style="color:blue;font-size:0.8em"> attention: rotate will mess up the interactivity of the rotated object <br />e.g. if combined with command <a href="#drag">"drag xy"</a> or keyword <a href="onclick">"onclick"</a> : the mouse recognises the original -unrotated- coordinates of the object
  1447. </span></li>
  1448. </ul>
  1449. <li><a name='killrotate' href='#killrotate top'>  killrotate will reset the command <a href="#rotationcenter">rotationcenter xc,yc</a></a><ul>
  1450. <li><span style="color:blue;font-size:0.8em"> a following rotate command will have the first object point as rotation center
  1451. </span></li>
  1452. <li><span style="color:blue;font-size:0.8em"> if not set, the rotation center will remain unchanged
  1453. </span></li>
  1454. </ul>
  1455. <li><a name='killaffine' href='#killaffine top'>  killaffine</a><ul>
  1456. <li><span style="color:blue;font-size:0.8em"> keyword : resets the transformation matrix to 1,0,0,1,0,0
  1457. </span></li>
  1458. </ul>
  1459. <li><a name='affine' href='#affine top'>  affine a,b,c,d,tx,ty</a><ul>
  1460. <li><span style="color:blue;font-size:0.8em"> defines a transformation matrix for subsequent objects
  1461. </span></li>
  1462. <li><span style="color:blue;font-size:0.8em"> images drawn by setting skew params a &amp; d will be very different from Flydraw's "affine a,b,c,d,e,tx,ty" !!
  1463. </span></li>
  1464. <li><span style="color:blue;font-size:0.8em"> use keyword 'killaffine' to end the transformation
  1465. </span></li>
  1466. <li><span style="color:blue;font-size:0.8em"> note 1: only 'draggable' / 'noclick' objects can be transformed.
  1467. </span></li>
  1468. <li><span style="color:blue;font-size:0.8em"> note 2: do not use 'onclick' or 'drag xy' with tranformation objects : the mouse coordinates do not get transformed (yet)
  1469. </span></li>
  1470. <li><span style="color:blue;font-size:0.8em"> note 3: no matrix operations on the transformation matrix implemented (yet)
  1471. </span></li>
  1472. <li><span style="color:blue;font-size:0.8em"> a : Scales the drawings horizontally
  1473. </span></li>
  1474. <li><span style="color:blue;font-size:0.8em"> b : Skews the drawings horizontally
  1475. </span></li>
  1476. <li><span style="color:blue;font-size:0.8em"> c : Skews the drawings vertically
  1477. </span></li>
  1478. <li><span style="color:blue;font-size:0.8em"> d : Scales the drawings vertically
  1479. </span></li>
  1480. <li><span style="color:blue;font-size:0.8em"> tx: Moves the drawings horizontally in xrange coordinate system
  1481. </span></li>
  1482. <li><span style="color:blue;font-size:0.8em"> ty: Moves the drawings vertically in yrange coordinate system
  1483. </span></li>
  1484. <li><span style="color:blue;font-size:0.8em"> the data precision may be set by preceding command "precision int"
  1485. </span></li>
  1486. </ul>
  1487. <li><a name='killtranslation' href='#killtranslation top'>  killtranslation</a><ul>
  1488. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='killtranslate' href='#killtranslate top'>killtranslate</a></span></li>
  1489. <li><span style="color:blue;font-size:0.8em"> resets the translation matrix to 1,0,0,1,0,0
  1490. </span></li>
  1491. </ul>
  1492. <li><a name='translation' href='#translation top'>  translation tx,ty</a><ul>
  1493. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='translate' href='#translate top'>translate</a></span></li>
  1494. <li><span style="color:blue;font-size:0.8em"> will translate the next objects tx in xrange and ty in yrange
  1495. </span></li>
  1496. <li><span style="color:blue;font-size:0.8em"> use command 'killtranstation' to end the command
  1497. </span></li>
  1498. </ul>
  1499. <li><a name='animate' href='#animate top'>  animate type</a><ul>
  1500. <li><span style="color:blue;font-size:0.8em"> REMOVED : this should be done with a slider
  1501. </span></li>
  1502. <li><span style="color:blue;font-size:0.8em"> type may be "point" (nothing else , yet...)
  1503. </span></li>
  1504. <li><span style="color:blue;font-size:0.8em"> the point is a filled rectangle ; adjust colour with command 'fillcolor colorname/hexnumber'
  1505. </span></li>
  1506. <li><span style="color:blue;font-size:0.8em"> will animate a point on the next plot/curve command
  1507. </span></li>
  1508. <li><span style="color:blue;font-size:0.8em"> the curve will not be draw
  1509. </span></li>
  1510. <li><span style="color:blue;font-size:0.8em"> moves repeatedly from xmin to xmax
  1511. </span></li>
  1512. </ul>
  1513. <li><a name='dashed' href='#dashed top'>  dashed</a><ul>
  1514. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1515. </span></li>
  1516. <li><span style="color:blue;font-size:0.8em"> next object will be drawn with a dashed line
  1517. </span></li>
  1518. <li><span style="color:blue;font-size:0.8em"> change dashing scheme by using command <a href="#dashtype">dashtype</a>
  1519. </span></li>
  1520. </ul>
  1521. <li><a name='filled' href='#filled top'>  filled</a><ul>
  1522. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1523. </span></li>
  1524. <li><span style="color:blue;font-size:0.8em"> the next 'fillable' object (only) will be filled
  1525. </span></li>
  1526. <li><span style="color:blue;font-size:0.8em"> use command "fillcolor color" to set fillcolor
  1527. </span></li>
  1528. <li><span style="color:blue;font-size:0.8em"> use command "opacity 0-255,0-255" to set stroke and fill-opacity
  1529. </span></li>
  1530. <li><span style="color:blue;font-size:0.8em"> use command "fill x,y,color" or "floodfill x,y,color" to fill the space around (x;y) with color <br />pixel operation implemented in javascript: use with care !
  1531. </span></li>
  1532. </ul>
  1533. <li><a name='highlight' href='#highlight top'>  highlight color,opacity,linewidth</a><ul>
  1534. <li><span style="color:blue;font-size:0.8em"> NOT IMPLEMENTED
  1535. </span></li>
  1536. <li><span style="color:blue;font-size:0.8em"> use command "onclick" : when the object receives a userclick it will increase its linewidth
  1537. </span></li>
  1538. </ul>
  1539. <li><a name='fillcolor' href='#fillcolor top'>  fillcolor colorname or #hex</a><ul>
  1540. <li><span style="color:blue;font-size:0.8em"> set the color for a filled object : mainly used for command 'userdraw obj,stroke_color'
  1541. </span></li>
  1542. <li><span style="color:blue;font-size:0.8em"> all fillable massive objects will have a fillcolor == strokecolor (just to be compatible with flydraw...)
  1543. </span></li>
  1544. </ul>
  1545. <li><a name='strokecolor' href='#strokecolor top'>  strokecolor colorname or #hex</a><ul>
  1546. <li><span style="color:blue;font-size:0.8em"> to be used for commands that do not supply a color argument (like command 'linegraph')
  1547. </span></li>
  1548. </ul>
  1549. <li><a name='bgimage' href='#bgimage top'>  bgimage image_location</a><ul>
  1550. <li><span style="color:blue;font-size:0.8em"> use an image as background .<br />technical: we use the background of 'canvas_div'
  1551. </span></li>
  1552. <li><span style="color:blue;font-size:0.8em"> the background image will be resized to match "width = xsize" and "height = ysize"
  1553. </span></li>
  1554. </ul>
  1555. <li><a name='bgcolor' href='#bgcolor top'>  bgcolor colorname or #hex</a><ul>
  1556. <li><span style="color:blue;font-size:0.8em"> use this color as background of the "div" containing the canvas(es)
  1557. </span></li>
  1558. </ul>
  1559. <li><a name='copy' href='#copy top'>  copy x,y,x1,y1,x2,y2,[filename URL]</a><ul>
  1560. <li><span style="color:blue;font-size:0.8em"> The image may be "bitmap" or "SVG"
  1561. </span></li>
  1562. <li><span style="color:blue;font-size:0.8em"> Insert the region from (x1,y1) to (x2,y2) (in pixels) of [filename] to (x,y) in x/y-range
  1563. </span></li>
  1564. <li><span style="color:blue;font-size:0.8em"> If x1=y1=x2=y2=-1, the whole [filename URL] is copied.
  1565. </span></li>
  1566. <li><span style="color:blue;font-size:0.8em"> [filename] is the URL of the image
  1567. </span></li>
  1568. <li><span style="color:blue;font-size:0.8em"> URL is normal URL of network reachable image file location<br />(eg special url for 'classexo' not -yet- implemented)
  1569. </span></li>
  1570. <li><span style="color:blue;font-size:0.8em"> if command <a href="#drag">'drag x/y/xy'</a> is set before command 'copy', the images will be draggable<br />javascript function read_canvas(); will return the x/y coordinate data in xrange/yrange of all -including non draggable- images<br />the command drag is only valid for the next image<br />draggable / non-draggable images may be mixed<br />may be used together with preceding keywords 'snaptogrid','xsnaptogrid','ysnaptogrid' or 'snaptopoints x1,y1,x2,y2...'
  1571. </span></li>
  1572. <li><span style="color:blue;font-size:0.8em"> if keyword <a href="#onclick">'onclick'</a> is set before command 'copy' the image(s) is clickable (marked with a green rectangle around the image)<br />use 'read_dragdrop' to get the number of the clicked image(s)<br />use command 'clearbutton some_text' to reset the reply/click array.<br />example: 4 images; student clicked on image 2 and 3 : reply = 0,1,1,0<br />after clicking the clear button: reply = 0,0,0,0<br />May be mixed with commands 'drag x|y|xy' (use javascript read_canvas to get the new coordinates
  1573. </span></li>
  1574. <li><span style="color:blue;font-size:0.8em"> 'onclick' for external images may be mixed with canvas generated stuff (like lines,curves etc)
  1575. </span></li>
  1576. <li><span style="color:blue;font-size:0.8em"> you may draw / userdraw / drag other stuff on top of an "imported" image
  1577. </span></li>
  1578. </ul>
  1579. <li><a name='copyresized' href='#copyresized top'>  copyresized x1,y2,x2,y2,dx1,dy1,dx2,dy2,image_file_url</a><ul>
  1580. <li><span style="color:blue;font-size:0.8em"> The image may be any "bitmap" or "SVG"
  1581. </span></li>
  1582. <li><span style="color:blue;font-size:0.8em"> Insert the region from (x1,y1) to (x2,y2) (in pixels) of [ filename], <br />possibly resized,<br />to the region of (dx1,dy1) to (dx2,dy2) in x/y-range
  1583. </span></li>
  1584. <li><span style="color:blue;font-size:0.8em"> (dx1:dy1) must be left top corner; (dx2 :dy2) must be right bottom corner of inserted image
  1585. </span></li>
  1586. <li><span style="color:blue;font-size:0.8em"> If x1=y1=x2=y2=-1, the whole [filename / URL ] is copied and resized.
  1587. </span></li>
  1588. <li><span style="color:blue;font-size:0.8em"> URL is normal URL of network reachable image file location<br />(as seen from public_html-root or network reachable 'http://some_server/my_images/test.gif'<br />(eg no special wims paths are searched !!)
  1589. </span></li>
  1590. <li><span style="color:blue;font-size:0.8em"> if command <a href="#drag">'drag x/y/xy'</a> is set before command 'copy', the images will be draggable<br />javascript function read_canvas(); will return the x/y coordinate data in xrange/yrange of all -including non draggable- images<br />the command drag is only valid for the next image<br />draggable / non-draggable images may be mixed<br />may be used together with preceding keywords 'snaptogrid','xsnaptogrid','ysnaptogrid' or 'snaptopoints x1,y1,x2,y2...'
  1591. </span></li>
  1592. <li><span style="color:blue;font-size:0.8em"> if keyword <a href="#onclick">'onclick'</a> is set before command 'copy' the image(s) is clickable (marked with a green rectangle around the image)<br />use 'read_dragdrop' to get the number of the clicked image(s)<br />use command 'clearbutton some_text' to reset the reply/click array.<br />example: 4 images; student clicked on image 2 and 3 : reply = 0,1,1,0<br />after clicking the clear button: reply = 0,0,0,0<br />May be mixed with commands 'drag x|y|xy' (use javascript read_canvas to get the new coordinates
  1593. </span></li>
  1594. <li><span style="color:blue;font-size:0.8em"> 'onclick' for external images may be mixed with canvas generated stuff (like lines,curves etc)
  1595. </span></li>
  1596. <li><span style="color:blue;font-size:0.8em"> you may draw / userdraw / drag stuff on top of an "imported" image
  1597. </span></li>
  1598. </ul>
  1599. <li><a name='clearbutton' href='#clearbutton top'>  clearbutton value</a><ul>
  1600. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='delete' href='#delete top'>delete</a></span></li>
  1601. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='erase' href='#erase top'>erase</a></span></li>
  1602. <li><span style="color:blue;font-size:0.8em"> adds a button to clear the <a href="#userdraw">userdraw</a> canvas with text 'value'
  1603. </span></li>
  1604. <li><span style="color:blue;font-size:0.8em"> <b>attention</b> command 'clearbutton' is incompatible with <a href="multidraw">multidraw</a> based drawings<br/>(in 'multidraw' there is always a remove_object_button for every drawprimitive)
  1605. </span></li>
  1606. <li><span style="color:blue;font-size:0.8em"> normally <a href="#userdraw">userdraw</a> primitives have the option to use middle/right mouse button on<br /> a point of the object to remove this specific object...this clear button will remove all drawings
  1607. </span></li>
  1608. <li><span style="color:blue;font-size:0.8em"> uses the tooltip placeholder div element: may not be used with command 'intooltip'
  1609. </span></li>
  1610. <li><span style="color:blue;font-size:0.8em"> use command <a href="#inputstyle">'inputstyle'</a> to style the button...
  1611. </span></li>
  1612. <li><span style="color:blue;font-size:0.8em"> the clearbutton will have id="canvas_scripts[%d]" ; starting with %d=0 for the first script<br />to change the style of all "clearbutton" of all included canvasdraw scripts, use something like<br /><em>if(document.getElementById("clearbutton"+canvas_scripts[0])){<br />&nbsp;var p = 0;<br />&nbsp;while(document.getElementById("clearbutton"+canvas_scripts[p])){<br />&nbsp;&nbsp;document.getElementById("clearbutton"+canvas_scripts[p]).className="some_class_name";<br />&nbsp;&nbsp;&lt;!&minus;&minus; or document.getElementById("clearbutton"+canvas_scripts[p]).setAttribute("style","some_style"); &minus;&minus;&gt;<br />&nbsp;&nbsp;p++;<br />&nbsp;};<br />};<br />
  1613. </span></li>
  1614. </ul>
  1615. <li><a name='inputstyle' href='#inputstyle top'>  inputstyle style_description</a><ul>
  1616. <li><span style="color:blue;font-size:0.8em"> may be used before any 'style-able' html object.(like inputfields or buttons)<br />or any html objects that are generated by some canvasdraw commands
  1617. </span></li>
  1618. <li><span style="color:blue;font-size:0.8em"> example: inputstyle color:blue;font-weight:bold;font-style:italic;font-size:16pt
  1619. </span></li>
  1620. </ul>
  1621. <li><a name='input' href='#input top'>  input x,y,size,editable,value</a><ul>
  1622. <li><span style="color:blue;font-size:0.8em"> to set inputfield "readonly", use editable = 0
  1623. </span></li>
  1624. <li><span style="color:blue;font-size:0.8em"> only active inputfields (editable = 1) will be read with read_canvas();
  1625. </span></li>
  1626. <li><span style="color:blue;font-size:0.8em"> if "$status=done" (e.g. in answer.phtml) the inputfield will be cleared and set readonly<br />override this by keyword <a href="#status">'status'</a>
  1627. </span></li>
  1628. <li><span style="color:blue;font-size:0.8em"> may be further controlled by <a href="#inputstyle">"inputstyle"</a> (inputcss is not yet implemented...)
  1629. </span></li>
  1630. <li><span style="color:blue;font-size:0.8em"> if mathml inputfields are present and / or some userdraw is performed, these data will <b>not</b> be send as well (javascript:read_canvas();)
  1631. </span></li>
  1632. </ul>
  1633. <li><a name='textarea' href='#textarea top'>  textarea x,y,cols,rows,readonly,value</a><ul>
  1634. <li><span style="color:blue;font-size:0.8em"> may be further controlled by <a href="#inputstyle">"inputstyle"</a>
  1635. </span></li>
  1636. <li><span style="color:blue;font-size:0.8em"> if "$status=done" (e.g. in answer.phtml) the inputfield will be cleared and set readonly<br />override this by keyword <a href="#status">'status'.</a>
  1637. </span></li>
  1638. <li><span style="color:blue;font-size:0.8em"> if mathml inputfields are present and / or some userdraw is performed, these data will <b>not</b> be send as well (javascript:read_canvas();)
  1639. </span></li>
  1640. </ul>
  1641. <li><a name='precision' href='#precision top'>  precision int</a><ul>
  1642. <li><span style="color:blue;font-size:0.8em"> 1 = no decimals ; 10 = 1 decimal ; 100 = 2 decimals etc
  1643. </span></li>
  1644. <li><span style="color:blue;font-size:0.8em"> may be used / changed before every object
  1645. </span></li>
  1646. <li><span style="color:blue;font-size:0.8em"> In case of user interaction (like 'userdraw' or 'multidraw') this value will be used to determine the amount of decimals in the reply / answer
  1647. </span></li>
  1648. </ul>
  1649. <li><a name='setlimits' href='#setlimits top'>  setlimits</a><ul>
  1650. <li><span style="color:blue;font-size:0.8em"> keyword : if set, it will produce 4 inputfields for 'xmin,xmax,ymin,ymax' and an 'ok' button
  1651. </span></li>
  1652. <li><span style="color:blue;font-size:0.8em"> may be used for inputfield based zooming / panning
  1653. </span></li>
  1654. <li><span style="color:blue;font-size:0.8em"> may be styled using command <a href="#inputstyle">inputstyle</a>
  1655. </span></li>
  1656. <li><span style="color:blue;font-size:0.8em"> use commands <a href="#xlabel">xlabel / ylabel</a> to change text from xmin to 'xlabel' etc
  1657. </span></li>
  1658. <li><span style="color:blue;font-size:0.8em"> note:the input value will not be checked on validity
  1659. </span></li>
  1660. </ul>
  1661. <li><a name='zoom' href='#zoom top'>  zoom button_color</a><ul>
  1662. <li><span style="color:blue;font-size:0.8em"> introduce a very small 'controlpanel' at the lower right corner
  1663. </span></li>
  1664. <li><span style="color:blue;font-size:0.8em"> giving six 15&times;15px 'active' rectangle areas<br />(for &times;,leftarrow,rightarrow,uparrow,downarrow and a '-' and a '+' sign ) for zooming and/or panning of the image
  1665. </span></li>
  1666. <li><span style="color:blue;font-size:0.8em"> the 'x' symbol will do a 'location.reload' of the page, and thus reset all canvas drawings.
  1667. </span></li>
  1668. <li><span style="color:blue;font-size:0.8em"> choose an appropriate colour, so the small 'x,arrows,-,+' are clearly visible
  1669. </span></li>
  1670. <li><span style="color:blue;font-size:0.8em"> command 'opacity' may be used to set stroke_opacity of 'buttons
  1671. </span></li>
  1672. <li><span style="color:blue;font-size:0.8em"> note: use command 'zoom' at the end of your script code (the same is true for command 'mouse')
  1673. </span></li>
  1674. <li><span style="color:blue;font-size:0.8em"> note: only objects that may be set draggable / clickable will be zoomed / panned
  1675. </span></li>
  1676. <li><span style="color:blue;font-size:0.8em"> note: when an object is dragged, zooming / panning will cause the coordinates to be reset to the original position :( <br />e.g. dragging / panning will get lost. (array with 'drag data' is erased)<br />This is a design flaw and not a feature !!
  1677. </span></li>
  1678. </ul>
  1679. <li><a name='onclick' href='#onclick top'>  onclick</a><ul>
  1680. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments required)
  1681. </span></li>
  1682. <li><span style="color:blue;font-size:0.8em"> if the next object is clicked, its 'object onclick_or_drag sequence number' in fly script is returned <br /> by javascript:read_canvas();
  1683. </span></li>
  1684. <li><span style="color:blue;font-size:0.8em"> onclick seqeuence numbering starts at '0'.<br />e.g. if there are 6 objects set onclick, the first onclick object will have id-number '0', the last id-number '5'
  1685. </span></li>
  1686. <li><span style="color:blue;font-size:0.8em"> line based objects will show an increase in line width<br />font based objects will show the text in 'bold' when clicked.
  1687. </span></li>
  1688. <li><span style="color:blue;font-size:0.8em"> the click zone (accuracy) is determined by 2&times; the line width of the object
  1689. </span></li>
  1690. <li><span style="color:blue;font-size:0.8em"> onclick and <a href="#drag">drag x|y|xy</a> may be combined in a single flyscript <br />(although a single object can <b>not</b> be onclick and draggable at the same time...)
  1691. </span></li>
  1692. <li><span style="color:blue;font-size:0.8em"> note: not all objects may be set onclick
  1693. </span></li>
  1694. </ul>
  1695. <li><a name='drag' href='#drag top'>  drag [x][y][xy]</a><ul>
  1696. <li><span style="color:blue;font-size:0.8em"> the next object will be draggable in x / y / xy direction
  1697. </span></li>
  1698. <li><span style="color:blue;font-size:0.8em"> the displacement can be read by 'javascript:read_dragdrop();'
  1699. </span></li>
  1700. <li><span style="color:blue;font-size:0.8em"> the precision (default 2 decimals) in the student reply may be set with command <a href="#precision">'precision'.</a><br />Use this 'precision' command before this command 'drag x|y|xy' !
  1701. </span></li>
  1702. <li><span style="color:blue;font-size:0.8em"> 'onclick' and 'drag x|y|xy' may be combined (for different objects: a single object can either be onclick or drag , not both )
  1703. </span></li>
  1704. <li><span style="color:blue;font-size:0.8em"> 'multi_objects' will be numbered in the given x/y-sequence (example: points red,0,0,1,1,2,2,3,3 : point (0:0) is object_number 1)
  1705. </span></li>
  1706. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: static objects and 'onclick/drag' objects of the same type (like point,circle,etc) with the same coordinates (e.g. objects that overlap) will give problems in the 'recognition algorithm')<br />in this example<br /><em>linewidth 4<br />point 0,0,red<br />drag xy<br />point 0,0,blue<br /></em>the blue point will not be recognised as draggable !<br /><em>linewidth 4<br />drag xy<br />point 0,0,red<br />drag xy<br />point 0,0,blue<br /></em>both points will be recognised
  1707. </span></li>
  1708. <li><span style="color:blue;font-size:0.8em"> the answer is : drag_or_onclick_object_number : Xorg : Yorg : Xnew : Ynew<br />wherein object_number is the sequence number of the draggable &amp; onclick objects in your script.<br />Only draggable & onclick objects will have an object_number (e.g things like point,crosshair,line,segment,circle,rect,triangle...etc)
  1709. </span></li>
  1710. <li><span style="color:blue;font-size:0.8em"> use keyword 'snaptogrid' , 'xsnaptogrid' , 'ysnaptogrid' or command 'snaptopoints x1,y1,x2,y2,...' to switch from free to discrete movement
  1711. </span></li>
  1712. <li><span style="color:blue;font-size:0.8em"> in case of external images (commands copy / copyresized) the external image can be set draggable ; always xy. <br />The function javascript;read_canvas() will return the xy-coordinates of all images.
  1713. </span></li>
  1714. <li><span style="color:blue;font-size:0.8em"> note: in case an object is dragged , zooming or panning will cause the coordinates to be reset to the original position :( <br />e.g. dragging / panning will get lost. (array with 'drag data' is erased)<br />This is a design flaw and not a feature !!
  1715. </span></li>
  1716. </ul>
  1717. <li><a name='blink' href='#blink top'>  blink time(seconds)</a><ul>
  1718. <li><span style="color:blue;font-size:0.8em"> NOT IMPLEMETED -YET
  1719. </span></li>
  1720. </ul>
  1721. <li><a name='xunit' href='#xunit top'>  xunit some_unit_for_x-values</a><ul>
  1722. <li><span style="color:blue;font-size:0.8em"> unicode allowed (no html code)
  1723. </span></li>
  1724. <li><span style="color:blue;font-size:0.8em"> use together with command mousex
  1725. </span></li>
  1726. <li><span style="color:blue;font-size:0.8em"> will display the cursor x-coordinate in 'unit'
  1727. </span></li>
  1728. </ul>
  1729. <li><a name='yunit' href='#yunit top'>  yunit some_unit_for_y-values</a><ul>
  1730. <li><span style="color:blue;font-size:0.8em"> unicode allowed (no html code)
  1731. </span></li>
  1732. <li><span style="color:blue;font-size:0.8em"> use together with command mousey
  1733. </span></li>
  1734. <li><span style="color:blue;font-size:0.8em"> will display the cursor y-coordinate in 'unit'
  1735. </span></li>
  1736. </ul>
  1737. <li><a name='cursor' href='#cursor top'>  cursor 'some CSS cursor_style'</a><ul>
  1738. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='pointer' href='#pointer top'>pointer</a></span></li>
  1739. <li><span style="color:blue;font-size:0.8em"> style can be any valid CSS property value, like crosshair,grabbing,move etc
  1740. </span></li>
  1741. <li><span style="color:blue;font-size:0.8em"> wims will not check the validity of your cursor declaration
  1742. </span></li>
  1743. </ul>
  1744. <li><a name='display' href='#display top'>  display TYPE,color,fontsize</a><ul>
  1745. <li><span style="color:blue;font-size:0.8em"> TYPE may be x | y | xy | degree | radian | radius
  1746. </span></li>
  1747. <li><span style="color:blue;font-size:0.8em"> will display the mouse cursor coordinates as x-only,y-only,(x:y),<br />the radius of a circle (this only in case 'userdraw circle(s),color')<br />or the angle in degrees or radians for commands "userdraw arc,color" or protractor , ruler (if set dynamic)
  1748. </span></li>
  1749. <li><span style="color:blue;font-size:0.8em"> use commands 'xunit' and / or 'yunit' to add the units to the mouse values.<br />The "degree | radian" will always have the appropriate symbol)
  1750. </span></li>
  1751. <li><span style="color:blue;font-size:0.8em"> just like commands 'mouse','mousex','mousey','mouse_degree'...only other name)
  1752. </span></li>
  1753. </ul>
  1754. <li><a name='mouse_degree' href='#mouse_degree top'>  mouse_degree color,fontsize</a><ul>
  1755. <li><span style="color:blue;font-size:0.8em"> will display the angle in degrees between x-axis, (0:0) and the cursor (x:y) in 'color' and 'font size'<br /> using a fontfamily Ariel
  1756. </span></li>
  1757. <li><span style="color:blue;font-size:0.8em"> The angle is positive in QI and QIII and the angle value is negative in QII and QIV
  1758. </span></li>
  1759. <li><span style="color:blue;font-size:0.8em"> note: use command 'mouse' at the end of your script code (the same is true for command 'zoom')
  1760. </span></li>
  1761. </ul>
  1762. <li><a name='mousex' href='#mousex top'>  mousex color,fontsize</a><ul>
  1763. <li><span style="color:blue;font-size:0.8em"> will display the cursor x-coordinate in 'color' and 'font size'<br /> using the fontfamily Ariel
  1764. </span></li>
  1765. <li><span style="color:blue;font-size:0.8em"> note: use command 'mouse' at the end of your script code (the same is true for command 'zoom')
  1766. </span></li>
  1767. </ul>
  1768. <li><a name='mousey' href='#mousey top'>  mousey color,fontsize</a><ul>
  1769. <li><span style="color:blue;font-size:0.8em"> will display the cursor y-coordinate in 'color' and 'font size'<br /> using default fontfamily Ariel
  1770. </span></li>
  1771. <li><span style="color:blue;font-size:0.8em"> note: use command 'mouse' at the end of your script code (the same is true for command 'zoom')
  1772. </span></li>
  1773. </ul>
  1774. <li><a name='mouse' href='#mouse top'>  mouse color,fontsize</a><ul>
  1775. <li><span style="color:blue;font-size:0.8em"> will display the cursor (x:y) coordinates in 'color' and 'font size'<br /> using default fontfamily Ariel
  1776. </span></li>
  1777. <li><span style="color:blue;font-size:0.8em"> note: use command 'mouse' at the end of your script code (the same is true for command 'zoom')
  1778. </span></li>
  1779. </ul>
  1780. <li><a name='intooltip' href='#intooltip top'>  intooltip link_text</a><ul>
  1781. <li><span style="color:blue;font-size:0.8em"> link_text is a single line (span-element)
  1782. </span></li>
  1783. <li><span style="color:blue;font-size:0.8em"> link_text may also be an image URL 'http://some_server/images/my_image.png' or '$module_dir/gifs/my_image.jpg'
  1784. </span></li>
  1785. <li><span style="color:blue;font-size:0.8em"> link_text may contain HTML markup
  1786. </span></li>
  1787. <li><span style="color:blue;font-size:0.8em"> the canvas will be displayed in a tooltip on 'link_text'
  1788. </span></li>
  1789. <li><span style="color:blue;font-size:0.8em"> the canvas is default transparent: use command <a href="#bgcolor">'bgcolor color'</a> to adjust background-color<br />the link text will also be shown with this 'bgcolor'.
  1790. </span></li>
  1791. <li><span style="color:blue;font-size:0.8em"> many 'userinput stuff' will use the tooltip_placeholder_div element...only one is defined in the wims-page<br />and are therefor these commands are mutually exclusive.<br />keep this in mind...
  1792. </span></li>
  1793. </ul>
  1794. <li><a name='popup' href='#popup top'>  popup</a><ul>
  1795. <li><span style="color:blue;font-size:0.8em"> keyword (no arguments)
  1796. </span></li>
  1797. <li><span style="color:blue;font-size:0.8em"> if fly-script starts with keyword 'popup', the canvas image will be exclusively in a popup window (xsize px &times; ysize px)
  1798. </span></li>
  1799. <li><span style="color:blue;font-size:0.8em"> if keyword 'popup' is used after command 'size xsize,ysize' the canvas will also be displayed in a popup window with size 'xsize &times; ysize'
  1800. </span></li>
  1801. <li><span style="color:blue;font-size:0.8em"> the popup window will be embedded into the page as a 'normal' image , when 'status=done' ; override with keyword <a href="#status"> 'nostatus'</a>
  1802. </span></li>
  1803. <li><span style="color:blue;font-size:0.8em"> to access the read_canvas and read_dragdrop functions in a popup window, use:<br /><em><br /> function read_all(){<br /> if( typeof popup !== 'undefined' ){<br /> var fun1 = popup['read_dragdrop'+canvas_scripts[0]];<br /> var fun2 = popup['read_canvas'+canvas_scripts[0]];<br /> popup.close();<br /> return "dragdrop="+fun1()+"\ncanvas="+fun2();<br /> };<br /></em>
  1804. </span></li>
  1805. <li><span style="color:blue;font-size:0.8em"> to set a canvasdraw produced <a href="#clock">clock</a> or multiple clocks...use something like:<br /><em>popup.set_clock(clock_id,type,diff);</em><br />as js-function for a button (or something else) in your document page.<br />wherein <b>clock_id</b> starts with 0 for the first clock<br /><b>type</b> is 1 for Hours,2 for Minutes and 3 for Seconds<br /><b>diff</b> is the increment (positive or negative) per click
  1806. </span></li>
  1807. </ul>
  1808. <li><a name='audio' href='#audio top'>  audio x,y,w,h,loop,visible,audiofile location</a><ul>
  1809. <li><span style="color:blue;font-size:0.8em"> x,y : left top corner of audio element (in xrange / yrange)
  1810. </span></li>
  1811. <li><span style="color:blue;font-size:0.8em"> w,y : width and height in pixels
  1812. </span></li>
  1813. <li><span style="color:blue;font-size:0.8em"> loop : 0 or 1 ( 1 = loop audio fragment)
  1814. </span></li>
  1815. <li><span style="color:blue;font-size:0.8em"> visible : 0 or 1 (1 = show controls)
  1816. </span></li>
  1817. <li><span style="color:blue;font-size:0.8em"> audio format may be in *.mp3 or *.ogg
  1818. </span></li>
  1819. <li><span style="color:blue;font-size:0.8em"> If you are using *.mp3 : be aware that FireFox will not (never) play this ! (Pattented format)
  1820. </span></li>
  1821. <li><span style="color:blue;font-size:0.8em"> if you are using *.ogg : be aware that Microsoft based systems not support it natively
  1822. </span></li>
  1823. <li><span style="color:blue;font-size:0.8em"> To avoid problems supply both types (mp3 and ogg) of audiofiles.<br />the program will use both as source tag
  1824. </span></li>
  1825. <li><span style="color:blue;font-size:0.8em"> example: upload both audio1.ogg and audio1.mp3 to http://server/files/<br />audio 0,0,http://server/files/audio1.mp3<br />svdraw will copy html-tag audio1.mp3 to audio1.ogg<br /> and the browser will play the compatible file (audio1.ogg or audio1.mp3)<br />
  1826. </span></li>
  1827. </ul>
  1828. <li><a name='video' href='#video top'>  video x,y,w,h,videofile location</a><ul>
  1829. <li><span style="color:blue;font-size:0.8em"> x,y : left top corner of audio element (in xrange / yrange)
  1830. </span></li>
  1831. <li><span style="color:blue;font-size:0.8em"> w,y : width and height in pixels
  1832. </span></li>
  1833. <li><span style="color:blue;font-size:0.8em"> example:<br />wims getfile : video 0,0,120,120,myvideo.mp4
  1834. </span></li>
  1835. <li><span style="color:blue;font-size:0.8em"> video format may be in *.mp4 (todo:other formats)
  1836. </span></li>
  1837. </ul>
  1838. <li><a name='hatchfill' href='#hatchfill top'>  hatchfill x0,y0,dx,dy,color</a><ul>
  1839. <li><span style="color:blue;font-size:0.8em"> x0,y0 in xrange / yrange
  1840. </span></li>
  1841. <li><span style="color:blue;font-size:0.8em"> distances dx,dy in pixels
  1842. </span></li>
  1843. </ul>
  1844. <li><a name='diamondfill' href='#diamondfill top'>  diamondfill x0,y0,dx,dy,color</a><ul>
  1845. <li><span style="color:blue;font-size:0.8em"> x0,y0 in xrange / yrange
  1846. </span></li>
  1847. <li><span style="color:blue;font-size:0.8em"> distances dx,dy in pixels
  1848. </span></li>
  1849. </ul>
  1850. <li><a name='gridfill' href='#gridfill top'>  gridfill x0,y0,dx,dy,color</a><ul>
  1851. <li><span style="color:blue;font-size:0.8em"> x0,y0 in xrange / yrange
  1852. </span></li>
  1853. <li><span style="color:blue;font-size:0.8em"> distances dx,dy in pixels
  1854. </span></li>
  1855. <li><span style="color:blue;font-size:0.8em"> a draggable object may <a href="#snaptogrid">snap_to_grid</a> (using keywords snaptogrid,xsnaprogrid, ysnaptogrid or snaptopoints)
  1856. </span></li>
  1857. <li><span style="color:blue;font-size:0.8em"> userdraw object may snap_to_grid
  1858. </span></li>
  1859. </ul>
  1860. <li><a name='dotfill' href='#dotfill top'>  dotfill x0,y0,dx,dy,color</a><ul>
  1861. <li><span style="color:blue;font-size:0.8em"> x0,y0 in xrange / yrange
  1862. </span></li>
  1863. <li><span style="color:blue;font-size:0.8em"> distances dx,dy in pixels
  1864. </span></li>
  1865. <li><span style="color:blue;font-size:0.8em"> radius of dots is linewidth
  1866. </span></li>
  1867. </ul>
  1868. <li><a name='imagefill' href='#imagefill top'>  imagefill dx,dy,image_url</a><ul>
  1869. <li><span style="color:blue;font-size:0.8em"> The next suitable <b>filled object</b> will be filled with "image_url" tiled
  1870. </span></li>
  1871. <li><span style="color:blue;font-size:0.8em"> After pattern filling ,the fill-color should be reset !
  1872. </span></li>
  1873. <li><span style="color:blue;font-size:0.8em"> wims getins / image from class directory : imagefill 80,80,my_image.gif
  1874. </span></li>
  1875. <li><span style="color:blue;font-size:0.8em"> normal url : imagefill 80,80,$module_dir/gifs/my_image.gif
  1876. </span></li>
  1877. <li><span style="color:blue;font-size:0.8em"> normal url : imagefill 80,80,http://adres/a/b/c/my_image.jpg
  1878. </span></li>
  1879. <li><span style="color:blue;font-size:0.8em"> if dx,dy is larger than the image, the whole image will be background to the next object.
  1880. </span></li>
  1881. </ul>
  1882. <li><a name='canvastype' href='#canvastype top'>  canvastype TYPE</a><ul>
  1883. <li><span style="color:blue;font-size:0.8em"> for now only usefull before commands filltoborder / floodfill / clickfill etc operations<br />Only the images of this TYPE will be scanned and filled
  1884. </span></li>
  1885. <li><span style="color:blue;font-size:0.8em"> default value of TYPE is DRAG_CANVAS e.g. 5
  1886. </span></li>
  1887. <li><span style="color:blue;font-size:0.8em"> use another TYPE if you know what you are doing...
  1888. </span></li>
  1889. <li><span style="color:blue;font-size:0.8em"> other possible canvasses (transparent PNG pictures xsize x ysize on top of eachother)<ul><li>EXTERNAL_IMAGE_CANVAS = 0</li><li>BG_CANVAS = 1</li><li> STATIC_CANVAS = 2</li><li> MOUSE_CANVAS = 3 : used for command "mouse"</li><li> GRID_CANVAS = 4 :used for command "grid"</li><li> DRAG_CANVAS = 5 :default</li><li> DRAW_CANVAS = 6 :used for some static drawings</li><li> TEXT_CANVAS = 7 : used for text-strings</li><li> CLOCK_CANVAS = 8 : used for command "clock"</li><li> ANIMATE_CANVAS = 9 : not used for now</li><li> TRACE_CANVAS = 10 : used for command "trace_jscurve"</li><li> JSPLOT_CANVAS = 111 : will be increased with every new command "jscurve"</li> <li> FILL_CANVAS = 12 : this will be filled...so do not use ! </li><li> USERDRAW_JSPLOT 13 : will be increased with every new command "userinput function"</li></ul>
  1890. </span></li>
  1891. </ul>
  1892. <li><a name='filltoborder' href='#filltoborder top'>  filltoborder x,y,bordercolor,color</a><ul>
  1893. <li><span style="color:blue;font-size:0.8em"> fill the region of point (x:y) with color 'color'
  1894. </span></li>
  1895. <li><span style="color:blue;font-size:0.8em"> any other color will not act as border to the bucket fill
  1896. </span></li>
  1897. <li><span style="color:blue;font-size:0.8em"> use this command after all boundary objects are declared.
  1898. </span></li>
  1899. <li><span style="color:blue;font-size:0.8em"> use command <a href="#canvastype">canvastype </a> to fill another canvas (default should be fine: DRAG_CANVAS = 5)
  1900. </span></li>
  1901. <li><span style="color:blue;font-size:0.8em"> note: filltoborder is a very (client) cpu intensive operation!<br />filling is done pixel by pixel<br/>e.g. image size of 400x400 uses 160000 pixels : each pixel contains 4 data (R,G,B,Opacity) = 640000 data.<br />on every data a few operations / comparisons are done...<br />So have pity on your students CPU..
  1902. </span></li>
  1903. </ul>
  1904. <li><a name='floodfill' href='#floodfill top'>  floodfill x,y,color</a><ul>
  1905. <li><span style="color:blue;font-size:0.8em">alternative command:<a name='fill' href='#fill top'>fill</a></span></li>
  1906. <li><span style="color:blue;font-size:0.8em"> fill the region of point (x:y) with color 'color'
  1907. </span></li>
  1908. <li><span style="color:blue;font-size:0.8em"> any other color or size of picture (borders of picture) will act as border to the bucket fill
  1909. </span></li>
  1910. <li><span style="color:blue;font-size:0.8em"> use this command after all boundary objects are declared.
  1911. </span></li>
  1912. <li><span style="color:blue;font-size:0.8em"> Use command 'userdraw clickfill,color' for user click driven flood fill.
  1913. </span></li>
  1914. <li><span style="color:blue;font-size:0.8em"> use command <a href="#canvastype">canvastype </a> to fill another canvas (default should be fine: DRAG_CANVAS = 5)
  1915. </span></li>
  1916. <li><span style="color:blue;font-size:0.8em"> note: floodfill is a very (client) cpu intensive operation!<br />filling is done pixel by pixel<br/>e.g. image size of 400x400 uses 160000 pixels : each pixel contains 4 data (R,G,B,Opacity) = 640000 data.<br />on every data a few operations / comparisons are done...<br />So have pity on your students CPU..
  1917. </span></li>
  1918. </ul>
  1919. <li><a name='setpixel' href='#setpixel top'>  setpixel x,y,color</a><ul>
  1920. <li><span style="color:blue;font-size:0.8em"> A rectangular "point" with diameter 1 pixel centered at (x:y) in xrange / yrange
  1921. </span></li>
  1922. <li><span style="color:blue;font-size:0.8em"> pixels can <b>not</b> be dragged or clicked
  1923. </span></li>
  1924. <li><span style="color:blue;font-size:0.8em"> "pixelsize = 1" may be changed by command "pixelsize int"
  1925. </span></li>
  1926. </ul>
  1927. <li><a name='pixelsize' href='#pixelsize top'>  pixelsize int</a><ul>
  1928. <li><span style="color:blue;font-size:0.8em"> in case you want to deviate from default pixelsize = 1(...)
  1929. </span></li>
  1930. </ul>
  1931. <li><a name='pixels' href='#pixels top'>  pixels color,x1,y1,x2,y2,x3,y3...</a><ul>
  1932. <li><span style="color:blue;font-size:0.8em"> draw rectangular "points" with diameter 1 pixel
  1933. </span></li>
  1934. <li><span style="color:blue;font-size:0.8em"> pixels can <b>not</b> be dragged or clicked
  1935. </span></li>
  1936. <li><span style="color:blue;font-size:0.8em"> "pixelsize = 1" may be changed by command "pixelsize int"
  1937. </span></li>
  1938. </ul>
  1939. <li><a name='replyformat' href='#replyformat top'>  replyformat number</a><ul>
  1940. <li><span style="color:blue;font-size:0.8em"> use number=-1 to deactivate the js-functions read_canvas() and read_dragdrop()
  1941. </span></li>
  1942. <li><span style="color:blue;font-size:0.8em"> default values should be fine !
  1943. </span></li>
  1944. <li><span style="color:blue;font-size:0.8em"> use command 'precision [0,1,10,100,1000,10000...]' before command 'replyformat' to set the desired number of decimals in the student reply / drawing
  1945. </span></li>
  1946. <li><span style="color:blue;font-size:0.8em"> the last value for 'precision int' will be used to calculate the reply coordinates, if needed (read_canvas();)
  1947. </span></li>
  1948. <li><span style="color:blue;font-size:0.8em"> choose<ul><li>1 = x1,x2,x3,x4....x_n<br />y1,y2,y3,y4....y_n<br /><br />x/y in pixels</li><li>2 = x1,x2,x3,x4....x_n<br /> y1,y2,y3,y4....y_n<br /> x/y in xrange / yrange coordinate system<br /></li><li>3 = x1,x2,x3,x4....x_n<br /> y1,y2,y3,y4....y_n<br /> r1,r2,r3,r4....r_n<br /> x/y in pixels <br /> r in pixels</li><li>4 = x1,x2,x3,x4....x_n<br /> y1,y2,y3,y4....y_n<br /> r1,r2,r3,r4....r_n<br /> x/y in xrange / yrange coordinate system<br /> r in pixels</li><li>5 = Ax1,Ax2,Ax3,Ax4....Ax_n<br /> Ay1,Ay2,Ay3,Ay4....Ay_n<br /> Bx1,Bx2,Bx3,Bx4....Bx_n<br /> By1,By2,By3,By4....By_n<br /> Cx1,Cx2,Cx3,Cx4....Cx_n<br /> Cy1,Cy2,Cy3,Cy4....Cy_n<br /> ....<br /> Zx1,Zx2,Zx3,Zx4....Zx_n<br /> Zy1,Zy2,Zy3,Zy4....Zy_n<br /> x/y in pixels<br /></li><li>6 = Ax1,Ax2,Ax3,Ax4....Ax_n<br /> Ay1,Ay2,Ay3,Ay4....Ay_n<br /> Bx1,Bx2,Bx3,Bx4....Bx_n<br /> By1,By2,By3,By4....By_n<br /> Cx1,Cx2,Cx3,Cx4....Cx_n<br /> Cy1,Cy2,Cy3,Cy4....Cy_n<br /> ....<br /> Zx1,Zx2,Zx3,Zx4....Zx_n<br /> Zy1,Zy2,Zy3,Zy4....Zy_n<br /> x/y in xrange / yrange coordinate system<br /></li><li>7 = x1:y1,x2:y2,x3:y3,x4:y4...x_n:y_n<br /> x/y in pixels</li><li>8 = x1:y1,x2:y2,x3:y3,x4:y4...x_n:y_n<br /> x/y in xrange / yrange coordinate system</li><li>9 = x1:y1:r1,x2:y2:r2,x3:y3:r3,x4:y4:r3...x_n:y_n:r_n<br /> x/y in pixels</li><li>10 = x1:y1:r1,x2:y2:r2,x3:y3:r3,x4:y4:r3...x_n:y_n:r_n<br /> x/y in xrange / yrange coordinate system</li><li>11 = Ax1,Ay1,Ax2,Ay2<br /> Bx1,By1,Bx2,By2<br /> Cx1,Cy1,Cx2,Cy2<br /> Dx1,Dy1,Dx2,Dy2<br /> ......<br /> Zx1,Zy1,Zx2,Zy2<br /> x/y in xrange / yrange coordinate system</li><li>12 = Ax1,Ay1,Ax2,Ay2<br /> Bx1,By1,Bx2,By2<br />Cx1,Cy1,Cx2,Cy2<br /> Dx1,Dy1,Dx2,Dy2<br /> ......<br /> Zx1,Zy1,Zx2,Zy2<br /> x/y in pixels</li><li>13 = Ax1:Ay1:Ax2:Ay2,Bx1:By1:Bx2:By2,Cx1:Cy1:Cx2:Cy2,Dx1:Dy1:Dx2:Dy2, ... ,Zx1:Zy1:Zx2:Zy2<br /> x/y in xrange / yrange coordinate system</li><li>14 = Ax1:Ay1:Ax2:Ay2,Bx1:By1:Bx2:By2....Zx1:Zy1:Zx2:Zy2<br /> x/y in pixels</li><li>15 = reply from inputfields,textareas<br /> reply1,reply2,reply3,...,reply_n</li><li>16 = mathml input fields </li><li>17 = read "userdraw text,color" only (x1,y1,text1 \n x2,y2,text2...\n...x_n,y_n,text_n <br /> x/y-values are in xrang/yrange</li><li>18 = read_canvas() will read all interactive clocks in H1:M1:S1,H2:M2:S2...Hn:Mn:Sn</li><li>19 = read_canvas() will return the object number of marked / clicked object (clock)<br />analogue to (shape library) onclick command </li><li>20 = read_canvas() will reply "object_number:x:y" of external images : object_number of the first draggable external image in the fly-script starts with 0 <br />e.g. expect something like 0:-5:4,1:6:2,2:-2:-5 <br /> the first image position is (-5:4) , the second image position is (6:2) and the third image position is (-2:-5) <li>21 = (x1:y1) (x2:y2) ... (x_n:y_n)<br />verbatim coordinate return</li><li>22 = returns an array .... reply[0]=x1 reply[1]=y1 reply[2]=x2 reply[3]=y2 ... reply[n-1]=x_n reply[n]=y_n<br /> x/y in xrange / yrange coordinate system</li><li>23 : can only be used for drawtype 'polyline'<br />a typical click sequence in drawtype polyline is x1,y1,x2,y2,x2,y2,x3,y3,x3,y3.....,x(n-1),y(n-1),x(n-1),y(n-1),xn,yn --replyformat 23--> x1,y1,x2,y2,x3,y3,.....x(n-1),y(n-1),xn,yn multiple occurences will be filtered out.The reply will be in x-y-range (xreply \n yreply)</li><li>24 = read all inputfield values: even those set 'readonly'</li><li>25 = angle1,angle2...angle_n : will return the radius (one or many) of the user drawn circle segment in degrees </li><li>26 = rad1,rad2...rad_n : will return the radius (one or many) of the user drawn circle segment in radians </li><li>27 = return (only) userdraw inputfields x1,y1,text1 \n x2,y2,text2...\n...x_n,y_n,text_n</li><li>28 = x1,y1,r1,x2,y2,r2...x_n,y_n,r_n <br />x / y / r in xrange / yrange coordinate system: may be used to reinput into command 'circles color,x1,y1,r1,x2,y2,r2...x_n,y_n,r_n'<br /> will not return anything else (e.g. no inputfields , text etc)</li></ul>
  1949. </span></li>
  1950. </ul>
  1951. <li><a name='legendcolors' href='#legendcolors top'>  legendcolors color1:color2:color3:...:color_n</a><ul>
  1952. <li><span style="color:blue;font-size:0.8em"> will be used to colour a legend: use this command after the legend command ! e.g.<br />legend test1:test2:test3<br />legendcolors blue:red:orange
  1953. </span></li>
  1954. <li><span style="color:blue;font-size:0.8em"> make sure the number of colours match the number of legend items
  1955. </span></li>
  1956. <li><span style="color:blue;font-size:0.8em"> command 'legend' in case of 'piechart' and 'barchart' will use these colours per default (no need to specify 'legendcolors'
  1957. </span></li>
  1958. </ul>
  1959. <li><a name='legend' href='#legend top'>  legend string1:string2:string3....string_n</a><ul>
  1960. <li><span style="color:blue;font-size:0.8em"> will be used to create a legend for a graph
  1961. </span></li>
  1962. <li><span style="color:blue;font-size:0.8em"> also see command <a href='#piechart'>'piechart'</a>
  1963. </span></li>
  1964. <li><span style="color:blue;font-size:0.8em"> will use the same colors per default as used in the graphs : use command <a href='#legendcolors'>'legendcolors'</a> to override the default
  1965. </span></li>
  1966. <li><span style="color:blue;font-size:0.8em"> use command <a href="#fontsize">fontsize</a> to adjust. (command "fontfamily" is not active for command "legend")
  1967. </span></li>
  1968. </ul>
  1969. <li><a name='xlabel' href='#xlabel top'>  xlabel some_string</a><ul>
  1970. <li><span style="color:blue;font-size:0.8em"> will be used to create a label for the x-axis (label is in quadrant I)
  1971. </span></li>
  1972. <li><span style="color:blue;font-size:0.8em"> can only be used together with command 'grid'</a><br />not depending on keywords 'axis' and 'axisnumbering'
  1973. </span></li>
  1974. <li><span style="color:blue;font-size:0.8em"> font setting: italic Courier, fontsize will be slightly larger (fontsize + 4)<br />use command "fontsize" to adjust.<br />(command "fontfamily" is not active for this command)
  1975. </span></li>
  1976. </ul>
  1977. <li><a name='ylabel' href='#ylabel top'>  ylabel some_string</a><ul>
  1978. <li><span style="color:blue;font-size:0.8em"> will be used to create a (vertical) label for the y-axis (label is in quadrant I)
  1979. </span></li>
  1980. <li><span style="color:blue;font-size:0.8em"> can only be used together with command <a href="#grid">'grid'</a><br />not depending on keywords 'axis' and 'axisnumbering'
  1981. </span></li>
  1982. <li><span style="color:blue;font-size:0.8em"> font setting: italic Courier, fontsize will be slightly larger (fontsize + 4)<br />use command "fontsize" to adjust.<br />(command "fontfamily" is not active for this command)
  1983. </span></li>
  1984. </ul>
  1985. <li><a name='linegraph' href='#linegraph top'>  linegraph x1:y1:x2:y2...x_n:y_n</a><ul>
  1986. <li><span style="color:blue;font-size:0.8em"> will plot your data in a graph
  1987. </span></li>
  1988. <li><span style="color:blue;font-size:0.8em"> may <b>only</b> to be used together with command <a href='#grid'>'grid'</a>
  1989. </span></li>
  1990. <li><span style="color:blue;font-size:0.8em"> can be used together with freestyle x-axis/y-axis texts : see commands <a href='#xaxis'>'xaxis'</a>,<a href='#xaxisup'>'xaxisup'</a> and <a href='#yaxis'>'yaxis'</a>
  1991. </span></li>
  1992. <li><span style="color:blue;font-size:0.8em"> use command <a href='#legend'>'legend'</a> to provide an optional legend in right-top-corner
  1993. </span></li>
  1994. <li><span style="color:blue;font-size:0.8em"> also see command <a href='#piechart'>'piechart'</a>
  1995. </span></li>
  1996. <li><span style="color:blue;font-size:0.8em"> multiple linegraphs may be used in a single plot
  1997. </span></li>
  1998. <li><span style="color:blue;font-size:0.8em"> note: your arguments are not checked by canvasdraw : use your javascript console in case of trouble...
  1999. </span></li>
  2000. <li><span style="color:blue;font-size:0.8em"> <ul><li>use command <a href='#strokecolor'>'strokecolor'</a> before a command 'linegraph' to set the color of this graph</li><li>use command <a href='#linewidth'>'linewidth'</a> before command 'linegraph' to set linewidth of this graph</li><li>use keyword <a href='#dashed'>'dashed'</a> before command 'linegraph' to set dashing of the graph</li><li>if dashing is set, use command <a href='#dashtype'>'dashtype'</a> before command 'linegraph' to set the type of dashing of the (individual) graph</li></ul>
  2001. </span></li>
  2002. </ul>
  2003. <li><a name='barchart' href='#barchart top'>  barchart x_1:y_1:color_1:x_2:y_2:color_2:...x_n:y_n:color_n</a><ul>
  2004. <li><span style="color:blue;font-size:0.8em"> may <b>only</b> to be used together with command <a href='#grid'>'grid'</a>
  2005. </span></li>
  2006. <li><span style="color:blue;font-size:0.8em"> can be used together with freestyle x-axis/y-axis texts : see commands <a href='#xaxis'>'xaxis'</a>,<a href='#xaxisup'>'xaxisup'</a> and <a href='#yaxis'>'yaxis'</a>
  2007. </span></li>
  2008. <li><span style="color:blue;font-size:0.8em"> use command <a href='#legend'>'legend'</a> to provide an optional legend in right-top-corner
  2009. </span></li>
  2010. <li><span style="color:blue;font-size:0.8em"> multiple barchart command may be used in a single script
  2011. </span></li>
  2012. <li><span style="color:blue;font-size:0.8em"> also see command <a href='#piechart'>'piechart'</a>
  2013. </span></li>
  2014. <li><span style="color:blue;font-size:0.8em"> note: your arguments are not checked by canvasdraw : use your javascript console in case of trouble...
  2015. </span></li>
  2016. </ul>
  2017. <li><a name='clock' href='#clock top'>  clock x,y,r(px),H,M,S,type hourglass,interactive [ ,H_color,M_color,S_color,background_color,foreground_color ]</a><ul>
  2018. <li><span style="color:blue;font-size:0.8em"> use command 'opacity stroke-opacity,fill-opacity' to adjust foreground (stroke) and background (fill) transparency
  2019. </span></li>
  2020. <li><span style="color:blue;font-size:0.8em"> type hourglass:<br />type = 0 : only segments<br />type = 1 : only numbers<br />type = 2 : numbers and segments
  2021. </span></li>
  2022. <li><span style="color:blue;font-size:0.8em"> colors are optional: if not defined, default values will be used<br />default colours: clock 0,0,60,4,35,45,1,2<br />custom colours: clock 0,0,60,4,35,45,1,2,,,,yellow,red<br />custom colours: clock 0,0,60,4,35,45,1,2,white,green,blue,black,yellow
  2023. </span></li>
  2024. <li><span style="color:blue;font-size:0.8em"> if you don't want a seconds hand (or minutes...), just make it invisible by using the background color of the hourglass...
  2025. </span></li>
  2026. <li><span style="color:blue;font-size:0.8em"> interactive <ul><li>0 : not interactive, just clock(s)</li><li>1 : function read_canvas() will read all active clocks in H:M:S format<br />The active clock(s) can be adjusted by pupils</li><li>2 : function read_canvas() will return the clicked clock <br />(like multiplechoice; first clock in script in nr. 0 )</li><li>3: no prefab buttons...create your own buttons (or other means) to make the clock(s) adjustable by javascript function set_clock(num,type,diff)<br />wherein: num = clock id (starts with 0) ; type = 1 (hours) ; type = 2 (minutes) ; type = 3 (seconds) <br />and diff = the increment of 'type' (positive or negative) </li></ul>
  2027. </span></li>
  2028. <li><span style="color:blue;font-size:0.8em"> canvasdraw will not check validity of colornames...the javascript console is your best friend
  2029. </span></li>
  2030. <li><span style="color:blue;font-size:0.8em"> no combinations with other reply_types allowed, for now
  2031. </span></li>
  2032. <li><span style="color:blue;font-size:0.8em"> if interactive is set to '1', 6 buttons per clock will be displayed for adjusting a clock (H+ M+ S+ H- M- S-)<br /> set_clock(clock_id,type,incr) <br />first clock has clock_id=0 ; type : H=1,M=2,S=3 ; incr : increment integer
  2033. </span></li>
  2034. <li><span style="color:blue;font-size:0.8em"> note: if you need multiple -interactive- clocks on a webpage, use multiple 'clock' commands in a single script !<br />and <i>not multiple canvas scripts</i> in a single page
  2035. </span></li>
  2036. <li><span style="color:blue;font-size:0.8em"> note: clocks will not zoom or pan, when using command <a href='#zoom'>'zoom'</a>
  2037. </span></li>
  2038. </ul>
  2039. <li><a name='piechart' href='#piechart top'>  piechart xc,yc,radius,'data+colorlist'</a><ul>
  2040. <li><span style="color:blue;font-size:0.8em"> (xc : yc) center of circle diagram in xrange/yrange
  2041. </span></li>
  2042. <li><span style="color:blue;font-size:0.8em"> radius in pixels
  2043. </span></li>
  2044. <li><span style="color:blue;font-size:0.8em"> data+color list: a colon separated list of raw data and corresponding colours<br />canvasdraw will not check validity of colornames...<br />in case of trouble look into javascript debugging of your browser
  2045. </span></li>
  2046. <li><span style="color:blue;font-size:0.8em"> example data+colorlist : 132:red:23565:green:323:black:234324:orange:23434:yellow:2543:white
  2047. </span></li>
  2048. <li><span style="color:blue;font-size:0.8em"> the number of colors must match the number of data.
  2049. </span></li>
  2050. <li><span style="color:blue;font-size:0.8em"> use command "<a href='#opacity'>'opacity'</a> to adjust fill_opacity of colours
  2051. </span></li>
  2052. <li><span style="color:blue;font-size:0.8em"> use command <a href='#legend'>'legend'</a> to automatically create a legend <br />using the same colours as pie segments<br />unicode allowed in legend<br />expect javascript trouble if the amount of 'pie-slices', 'pie-colours' 'pie-legend-titles' do not match<br />a javascript console is your best friend...<br />use command 'fontfamily' to set the font of the legend.
  2053. </span></li>
  2054. </ul>
  2055. <li><a name='userboxplotdata' href='#userboxplotdata top'>  userboxplotdata</a><ul>
  2056. <li><span style="color:blue;font-size:0.8em"> keyword, no arguments
  2057. </span></li>
  2058. <li><span style="color:blue;font-size:0.8em"> use before command <a href="#boxplot">'boxplot x_or_y,box-height_or_box-width,x_or_y-position'</a>
  2059. </span></li>
  2060. <li><span style="color:blue;font-size:0.8em"> if set, the student will have to generate some statistical data. These data should be put in a named array "student_boxplot_data"
  2061. </span></li>
  2062. <li><span style="color:blue;font-size:0.8em"> "min,Q1,median,Q3,max" are calculated by a js-function and the 'draw_boxplot' function will draw a boxplot.
  2063. </span></li>
  2064. <li><span style="color:blue;font-size:0.8em"> see command <a href="#userboxplot">'userboxplot'</a> for calling 'draw_boxplot()'
  2065. </span></li>
  2066. </ul>
  2067. <li><a name='userboxplot' href='#userboxplot top'>  userboxplot</a><ul>
  2068. <li><span style="color:blue;font-size:0.8em"> keyword, no arguments
  2069. </span></li>
  2070. <li><span style="color:blue;font-size:0.8em"> use before command <a href="#boxplot">'boxplot x_or_y,box-height_or_box-width,x_or_y-position'</a>
  2071. </span></li>
  2072. <li><span style="color:blue;font-size:0.8em"> if set, the student will have to calculate "min,Q1,median,Q3,max" and feed these data into the 'draw_boxplot' function
  2073. </span></li>
  2074. <li><span style="color:blue;font-size:0.8em"> for example:<br />put the canvas-script into a html element with id='boxplot'and set style='display:none'<br />define a variable called 'student_boxplot' and fill it with the 5 student-data (from inputfields or something)<br />var student_boxplot = new Array(5)<br />function show_boxplot(){<br />student_boxplot[0] = min;<br />student_boxplot[1] = Q1;<br />student_boxplot[2] = median;<br />student_boxplot[3] = Q3;<br />student_boxplot[4] = max;<br />document.getElementById('boxplot').style.display = "block";<br />draw_boxplot(12345,1,2.00,5.00,[0,0,0,0,0],4,"0,0,255",0.78,"255,165,0",0.60,1,0,1,1);<br />};<br />In the canvas-script the function draw_boxplot has the following arguments:<br />draw_boxplot=function(canvas_type,xy,hw,cxy,data,line_width,stroke_color,stroke_opacity,fill_color,fill_opacity,use_filled,use_dashed,dashtype0,dashtype1)
  2075. </span></li>
  2076. </ul>
  2077. <li><a name='boxplotdata' href='#boxplotdata top'>  boxplotdata some_data</a><ul>
  2078. <li><span style="color:blue;font-size:0.8em"> 'some_data' are a list of numbers separated by a comma "," (items)
  2079. </span></li>
  2080. <li><span style="color:blue;font-size:0.8em"> only be used before command 'boxplot': the command <a href="#boxplot">'boxplot'</a> will provide the boxplot drawing of the data.
  2081. </span></li>
  2082. <li><span style="color:blue;font-size:0.8em"> xrange 0,100<br />yrange 0,10<br />boxplotdata 11,22,13,15,23,43,12,12,14,2,45,32,44,13,21,24,13,19,35,21,24,23<br />boxplot x,4,5
  2083. </span></li>
  2084. <li><span style="color:blue;font-size:0.8em"> note: wims will not check your data input | format. use js-error console to debug any problems.
  2085. </span></li>
  2086. <li><span style="color:blue;font-size:0.8em"> a javascript function 'statistics()' will parse the data and calculate the values [min,Q1,median,Q3,max] and hand them to the boxplot draw function.
  2087. </span></li>
  2088. </ul>
  2089. <li><a name='boxplot' href='#boxplot top'>  boxplot x_or_y,box-height_or_box-width,position,min,Q1,median,Q3,max</a><ul>
  2090. <li><span style="color:blue;font-size:0.8em"> example:<br />xrange 0,300<br />yrange 0,10<br />boxplot x,4,8,120,160,170,220,245<br />meaning: create a boxplot in x-direction, with height 4 (in yrange) and centered around line y=8
  2091. </span></li>
  2092. <li><span style="color:blue;font-size:0.8em"> example:<br />xrange 0,10<br />yrange 0,300<br />boxplot y,4,8,120,160,170,220,245<br />meaning: create a boxplot in y-direction, with width 4 (in xrange) and centered around line x=8
  2093. </span></li>
  2094. <li><span style="color:blue;font-size:0.8em"> use command <a href='filled'>'filled'</a> to fill the box<br /><b>note:</b> the strokecolor is used for filling Q1, the fillcolor is used for filling Q3
  2095. </span></li>
  2096. <li><span style="color:blue;font-size:0.8em"> use command <a href='#opacity'>'opacity'</a> to adjust fill_opacity of stroke and fill colours
  2097. </span></li>
  2098. <li><span style="color:blue;font-size:0.8em"> use command <a href='#legend'>'legend'</a> to automatically create a legend <br />unicode allowed in legend<br />use command 'fontfamily' to set the font of the legend.
  2099. </span></li>
  2100. <li><span style="color:blue;font-size:0.8em"> there is no limit to the number of boxplots used.
  2101. </span></li>
  2102. <li><span style="color:blue;font-size:0.8em"> can <b>not</b> be set draggable (<a href='#onclick'>'onclick'</a> is not ready ,yet)
  2103. </span></li>
  2104. <li><span style="color:blue;font-size:0.8em"> use keyword <a href="#userboxplot">'userboxplot'</a> before command boxplot, if a pupil must draw a boxplot (using his own min,Q1,median,Q3,max data)
  2105. </span></li>
  2106. <li><span style="color:blue;font-size:0.8em"> use keyword <a href="#userboxplotdata">'userboxplotdata'</a> before command boxplot, if a pupil must generate the data by some means.
  2107. </span></li>
  2108. <li><span style="color:blue;font-size:0.8em"> use command <a href="#boxplotdata">'boxplotdata'</a> when the boxplot should be drawn from wims-generated raw statistical date
  2109. </span></li>
  2110. </ul>
  2111. <li><a name='status' href='#status top'>  status</a><ul>
  2112. <li><span style="color:blue;font-size:0.8em"> keyword
  2113. </span></li>
  2114. <li><span style="color:blue;font-size:0.8em"> alernative : nostatus
  2115. </span></li>
  2116. <li><span style="color:blue;font-size:0.8em"> used to override the effects of "status=done" in wims (answer.phtml)
  2117. </span></li>
  2118. <li><span style="color:blue;font-size:0.8em"> affects 'readonly' in inputfields / textarea's in canvasimage and all userdraw based commands
  2119. </span></li>
  2120. <li><span style="color:blue;font-size:0.8em"> e.g.: if keyword 'status' is set, the pupil will be able to modify the canvas when the 'wims $status variable' is set to 'done'
  2121. </span></li>
  2122. </ul>
  2123. <li><a name='xlogbase' href='#xlogbase top'>  xlogbase number</a><ul>
  2124. <li><span style="color:blue;font-size:0.8em"> sets the logbase number for the x-axis
  2125. </span></li>
  2126. <li><span style="color:blue;font-size:0.8em"> default value 10
  2127. </span></li>
  2128. <li><span style="color:blue;font-size:0.8em"> use together with commands xlogscale / xylogscale
  2129. </span></li>
  2130. </ul>
  2131. <li><a name='ylogbase' href='#ylogbase top'>  ylogbase number</a><ul>
  2132. <li><span style="color:blue;font-size:0.8em"> sets the logbase number for the y-axis
  2133. </span></li>
  2134. <li><span style="color:blue;font-size:0.8em"> default value 10
  2135. </span></li>
  2136. <li><span style="color:blue;font-size:0.8em"> use together with commands ylogscale / xylogscale
  2137. </span></li>
  2138. </ul>
  2139. <li><a name='xlogscale' href='#xlogscale top'>  xlogscale ymajor,yminor,majorcolor,minorcolor</a><ul>
  2140. <li><span style="color:blue;font-size:0.8em"> the x/y-range are set using commands 'xrange xmin,xmax' and 'yrange ymin,ymax'
  2141. </span></li>
  2142. <li><span style="color:blue;font-size:0.8em"> ymajor is the major step on the y-axis; yminor is the divisor for the y-step
  2143. </span></li>
  2144. <li><span style="color:blue;font-size:0.8em"> the linewidth is set using command 'linewidth int'
  2145. </span></li>
  2146. <li><span style="color:blue;font-size:0.8em"> the opacity of major / minor grid lines is set by command <a href='#opacity'>'opacity</a>'
  2147. </span></li>
  2148. <li><span style="color:blue;font-size:0.8em"> default logbase number = 10 ... when needed , set the logbase number with command 'xlogbase number'
  2149. </span></li>
  2150. <li><span style="color:blue;font-size:0.8em"> the x/y- axis numbering is triggered by keyword 'axisnumbering'<ul><li>use command 'precision' before 'xlogscale' command to set the precision (decimals) of the axis numbering</li><li>use commands 'xlabel some_text' and/or 'ylabel some_text' for text on axis : use command 'fontsize int' to set the fontsize (default 12px)</li><li>use command 'fontfamily fnt_family_string' to set the fonts for axis-numbering</li><li>use command'fontcolor' to set the colour</li></ul>
  2151. </span></li>
  2152. <li><span style="color:blue;font-size:0.8em"> note: the complete canvas will be used for the 'log paper'
  2153. </span></li>
  2154. <li><span style="color:blue;font-size:0.8em"> note: userdrawings are done in the log paper, e.g. javascript:read_canvas() will return the real values
  2155. </span></li>
  2156. <li><span style="color:blue;font-size:0.8em"> note: command 'mouse color,fontsize' will show the real values in the logpaper.<br /> <li><span style="color:blue;font-size:0.8em"> note: when using something like 'xrange 0.0001,0.01'...combined with commands <a href='#mouse'>'mouse'</a> and/or <a href='#userdraw'>'userdraw</a>...<br /> make sure the <a href='#precision'>precision</a> is set accordingly
  2157. </span></li>
  2158. <li><span style="color:blue;font-size:0.8em"> note: in case of userdraw , the use of keyword <a href='#userinput_xy'>'userinput_xy'</a> may be handy !
  2159. </span></li>
  2160. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: keyword 'snaptogrid' may not lead to the desired result...
  2161. </span></li>
  2162. </ul>
  2163. <li><a name='ylogscale' href='#ylogscale top'>  ylogscale xmajor,xminor,majorcolor,minorcolor</a><ul>
  2164. <li><span style="color:blue;font-size:0.8em"> the x/y-range are set using commands 'xrange xmin,xmax' and 'yrange ymin,ymax'
  2165. </span></li>
  2166. <li><span style="color:blue;font-size:0.8em"> xmajor is the major step on the x-axis; xminor is the divisor for the x-step
  2167. </span></li>
  2168. <li><span style="color:blue;font-size:0.8em"> the linewidth is set using command 'linewidth int'
  2169. </span></li>
  2170. <li><span style="color:blue;font-size:0.8em"> the opacity of major / minor grid lines is set by command 'opacity [0-255],[0-255]'
  2171. </span></li>
  2172. <li><span style="color:blue;font-size:0.8em"> default logbase number = 10 ... when needed , set the logbase number with command 'ylogbase number'
  2173. </span></li>
  2174. <li><span style="color:blue;font-size:0.8em"> the x/y- axis numbering is triggered by keyword 'axisnumbering'<ul><li>use command 'precision' before 'ylogscale' command to set the precision (decimals) of the axis numbering</li><li>use commands 'xlabel some_text' and/or 'ylabel some_text' for text on axis : use command 'fontsize int' to set the fontsize (default 12px)</li><li>use command 'fontfamily fnt_family_string' to set the fonts for axis-numbering</li><li>use command'fontcolor' to set the colour</li></ul>
  2175. </span></li>
  2176. <li><span style="color:blue;font-size:0.8em"> note: the complete canvas will be used for the 'log paper'
  2177. </span></li>
  2178. <li><span style="color:blue;font-size:0.8em"> note: userdrawings are done in the log paper, e.g. javascript:read_canvas() will return the real values
  2179. </span></li>
  2180. <li><span style="color:blue;font-size:0.8em"> note: command 'mouse color,fontsize' will show the real values in the logpaper.<br /> <li><span style="color:blue;font-size:0.8em"> note: when using something like 'yrange 0.0001,0.01'...combined with commands 'mouse color,fontsize' and/or 'userdraw type,color'...<br /> make sure the precision is set accordingly (eg command 'precision 10000')
  2181. </span></li>
  2182. <li><span style="color:blue;font-size:0.8em"> note: in case of userdraw , the use of keyword 'userinput_xy' may be handy !
  2183. </span></li>
  2184. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: keyword 'snaptogrid' may not lead to the desired result...
  2185. </span></li>
  2186. </ul>
  2187. <li><a name='xylogscale' href='#xylogscale top'>  xylogscale majorcolor,minorcolor</a><ul>
  2188. <li><span style="color:blue;font-size:0.8em"> the x/y-range are set using commands 'xrange xmin,xmax' and 'yrange ymin,ymax'
  2189. </span></li>
  2190. <li><span style="color:blue;font-size:0.8em"> the linewidth is set using command 'linewidth int'
  2191. </span></li>
  2192. <li><span style="color:blue;font-size:0.8em"> the opacity of major / minor grid lines is set by command 'opacity [0-255],[0-255]'
  2193. </span></li>
  2194. <li><span style="color:blue;font-size:0.8em"> default logbase number = 10 ... when needed , set the logbase number with command 'xlogbase number' and/or 'ylogbase number'
  2195. </span></li>
  2196. <li><span style="color:blue;font-size:0.8em"> the x/y- axis numbering is triggered by keyword 'axisnumbering'<ul><li>use commands 'xlabel some_text' and/or 'ylabel some_text' for text on axis : use command 'fontsize int' to set the fontsize (default 12px)</li><li>use command 'fontfamily fnt_family_string' to set the fonts for axis-numbering</li><li>use command'fontcolor' to set the colour</li></ul>
  2197. </span></li>
  2198. <li><span style="color:blue;font-size:0.8em"> note: the complete canvas will be used for the 'log paper'
  2199. </span></li>
  2200. <li><span style="color:blue;font-size:0.8em"> note: userdrawings are done in the log paper, e.g. javascript:read_canvas() will return the real values
  2201. </span></li>
  2202. <li><span style="color:blue;font-size:0.8em"> note: command 'mouse color,fontsize' will show the real values in the logpaper.<br /> <li><span style="color:blue;font-size:0.8em"> note: when using something like 'yrange 0.0001,0.01'...combined with commands 'mouse color,fontsize' and/or 'userdraw type,color'...<br /> make sure the precision is set accordingly (eg command 'precision 10000')
  2203. </span></li>
  2204. <li><span style="color:blue;font-size:0.8em"> note: in case of userdraw , the use of keyword 'userinput_xy' may be handy !
  2205. </span></li>
  2206. <li><span style="color:blue;font-size:0.8em"> <b>attention</b>: keyword 'snaptogrid' may not lead to the desired result...
  2207. </span></li>
  2208. </ul>
  2209.  
  2210. </li>
  2211. </ul>
  2212. <script type='text/javascript'>
  2213.  var keys = ['canvasdraw' ,'canvasdraw','size','xrange','rangex','yrange','rangey','trange','ranget','linewidth','crosshairsize','crosshair','crosshairs','point','points','yerrorbars','xerrorbars','circle','circles','disks','segment','seg','segments','segs','line','lines','demiline','halfline','demilines','halflines','hline','horizontalline','hlines','horizontallines','vline','verticalline','vlines','verticallines','square','rect','rects','roundrect','roundrects','polyline','poly','arc','angle','ellipse','dashtype','rays','arrowhead','arrow','vector','arrows','vectors','arrow2','arrows2','parallel','triangle','triangles','lattice','multistrokeopacity','multifillopacity','multilabel','multilinewidth','multidash','multisnaptogrid','multifill','multistrokecolors','multifillcolors','multiuserinput','multidraw','ruler','protractor','userdraw','note:','snaptofunction','snaptofun','snaptopoints','snaptogrid','xsnaptogrid','ysnaptogrid','userinput','userinput_function','userinput_textarea','userinput_xy','usertextarea_xy','userinput_xy','functionlabel','userinput_function','plotsteps','fontsize','fontcolor','jscurve','jsplot','curve','levelcurve','bezier','trace_jscurve','jsmath','text','textup','fontfamily','stringup','string','centerstring','mathml','http','html','noaxis','noayis','xaxis','xaxistext','xaxisup','xaxistextup','yaxis','axisnumbering','axis','killslider','sliderfunction_x','sliderfunction_y','slider','sgraph','grid','opacity','transparent','rotationcenter','rotate','killrotate','killaffine','affine','killtranslation','killtranslate','translation','translate','animate','dashed','filled','highlight','fillcolor','strokecolor','bgimage','bgcolor','copy','copyresized','clearbutton','delete','erase','inputstyle','input','textarea','precision','setlimits','zoom','onclick','drag','blink','xunit','yunit','cursor','pointer','display','mouse_degree','mousex','mousey','mouse','intooltip','popup','audio','video','hatchfill','diamondfill','gridfill','dotfill','imagefill','canvastype','filltoborder','floodfill','fill','setpixel','pixelsize','pixels','replyformat','legendcolors','legend','xlabel','ylabel','linegraph','barchart','clock','piechart','userboxplotdata','userboxplot','boxplotdata','boxplot','status','xlogbase','ylogbase','xlogscale','ylogscale','xylogscale'];
  2214.  var keys_len = keys.length;
  2215.  function match(s1,s2){
  2216.   var n1 = s1.length;
  2217.   if(n1 < 3){return 0;}
  2218.   var n2 = s2.length;
  2219.   var c1,c2,found;
  2220.   var count = n1 - Math.abs(n1 - n2);
  2221.   for(var p = 0;p < n1;p++){
  2222.    c1=s1.charAt(p);
  2223.    found = false;
  2224.    for(var i = 0;i < n2;i++){
  2225.     c2 = s2.charAt(i);
  2226.     if(c1 == c2){found = true;count = count + n1 - Math.abs(p - i);}
  2227.    };
  2228.    if(! found ){count = count - n2;}
  2229.   };
  2230.   return count;
  2231.  };
  2232.  function look(){
  2233.   var s = ((document.getElementById('search').value).replace(/\s/g, '')).toLowerCase();
  2234.   var typo;var next_best = -1;var next_idx = s.length;var tmp;var ss;
  2235.   for(var p = 0; p < keys_len ; p++){
  2236.    ss = keys[p];
  2237.    if( s == ss ){
  2238.     window.location.href = '#'+ss;
  2239.     return;
  2240.    };
  2241.    /* not ok? ... try to find a match for a reasonable typo... */
  2242.    tmp = match(s,ss);
  2243.    if(tmp > next_idx){
  2244.     next_idx = tmp;
  2245.     next_best = p;
  2246.    };
  2247.   };
  2248.   if(next_best != -1 ){
  2249.    typo = keys[next_best];
  2250.    if(confirm('"'+s+'" is not a valid canvasdraw command\ndid you mean "'+typo+'" ?')){
  2251.     window.location.href = '#'+typo;
  2252.     return;
  2253.    };
  2254.   }
  2255.   else
  2256.   {
  2257.    alert(s+' is not a valid canvasdraw command');
  2258.   };
  2259.   return;
  2260.  };
  2261. </script>
  2262.