Subversion Repositories wimsdev

Rev

Rev 15711 | Rev 15716 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15711 Rev 15715
Line 369... Line 369...
369
            }
369
            }
370
            break;
370
            break;
371
        case ARCARROW:
371
        case ARCARROW:
372
        /*
372
        /*
373
         @ arrowarc xc,yc,x-width,y-height,start_angle,end_angle,color,type
373
         @ arrowarc xc,yc,x-width,y-height,start_angle,end_angle,color,type
374
         @ alternative: <code>arcarrow</code>
374
         @ alternative: arcarrow
375
         @ uses same syntax as <a href='#arc'>arc</a>
375
         @ uses same syntax as <a href='#arc'>arc</a>
376
         @ for arrow hat: type = 1 : right<br />type = 2 : left<br />type = 3 : left&amp;right
376
         @ for arrow hat: type = 1 : right<br />type = 2 : left<br />type = 3 : left&amp;right
377
         @ if the default arrow hat/head is not satisfactory , the size of the arrow may be set with command <a href='#arrowhead'>arrowhead</a>
377
         @ if the default arrow hat/head is not satisfactory , the size of the arrow may be set with command <a href='#arrowhead'>arrowhead</a>
378
         @ no other arrow types are implemented...yet
378
         @ no other arrow types are implemented...yet
379
         @ may be set draggable or onclick
379
         @ may be set draggable or onclick
Line 417... Line 417...
417
            }
417
            }
418
            break;
418
            break;
419
        case ARROW:
419
        case ARROW:
420
        /*
420
        /*
421
        @ arrow x1,y1,x2,y2,h,color
421
        @ arrow x1,y1,x2,y2,h,color
422
        @ alternative: <code>vector</code>
422
        @ alternative: vector
423
        @ draw a single headed arrow / vector from (x1:y1) to (x2:y2)<br />with arrowhead size h in px and in color ''color``
423
        @ draw a single headed arrow / vector from (x1:y1) to (x2:y2)<br />with arrowhead size h in px and in color ''color``
424
        @ use command <code>linewidth int</code> to adjust thickness of the arrow
424
        @ use command <code>linewidth int</code> to adjust thickness of the arrow
425
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
425
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
426
        @%arrow_drag%size 400,400%xrange -10,10%yrange -10,10%cursor move%linewidth 2%drag xy%arrow 0,0,4,3,8,blue%drag xy%arrow 0,0,-4,3,8,green%drag xy%arrow 0,0,4,-3,8,orange%drag xy%arrow 0,0,-4,-3,8,cyan
426
        @%arrow_drag%size 400,400%xrange -10,10%yrange -10,10%cursor move%linewidth 2%drag xy%arrow 0,0,4,3,8,blue%drag xy%arrow 0,0,-4,3,8,green%drag xy%arrow 0,0,4,-3,8,orange%drag xy%arrow 0,0,-4,-3,8,cyan
427
        @%arrow_click%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%%onclick%arrow 0,0,4,4,8,blue%onclick%arrow 0,0,-4,5,8,green%onclick%arrow 0,0,4,-6,8,orange%onclick%arrow 0,0,-4,-2,8,cyan
427
        @%arrow_click%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%%onclick%arrow 0,0,4,4,8,blue%onclick%arrow 0,0,-4,5,8,green%onclick%arrow 0,0,4,-6,8,orange%onclick%arrow 0,0,-4,-2,8,cyan
Line 452... Line 452...
452
            break;
452
            break;
453
 
453
 
454
        case ARROWS:
454
        case ARROWS:
455
        /*
455
        /*
456
        @ arrows color,head (px),x1,y1,x2,y2...x_n,y_n
456
        @ arrows color,head (px),x1,y1,x2,y2...x_n,y_n
457
        @ alternative: <code>vectors</code>
457
        @ alternative: vectors
458
        @ draw single headed arrows / vectors from (x1:y1) to (x2:y2) ... (x3:y3) to (x4:y4) etc ... in color 'color'
458
        @ draw single headed arrows / vectors from (x1:y1) to (x2:y2) ... (x3:y3) to (x4:y4) etc ... in color 'color'
459
        @ use command <code>linewidth int</code> to adjust thickness of the arrow
459
        @ use command <code>linewidth int</code> to adjust thickness of the arrow
460
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
460
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
461
        @%arrows_click%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%arrows red,8,0,0,4,3,0,0,2,4,0,0,-2,4,0,0,-3,-4,0,0,3,-2%
461
        @%arrows_click%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%arrows red,8,0,0,4,3,0,0,2,4,0,0,-2,4,0,0,-3,-4,0,0,3,-2%
462
        @%arrows_drag%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag xy%arrows red,8,0,0,4,3,0,0,2,4,0,0,-2,4,0,0,-3,-4,0,0,3,-2%
462
        @%arrows_drag%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag xy%arrows red,8,0,0,4,3,0,0,2,4,0,0,-2,4,0,0,-3,-4,0,0,3,-2%
Line 864... Line 864...
864
 
864
 
865
        case CIRCLE:
865
        case CIRCLE:
866
        /*
866
        /*
867
        @ circle xc,yc,width (2*r in pixels),color
867
        @ circle xc,yc,width (2*r in pixels),color
868
        @ use command <code>fcircle xc,yc,d,color</code>
868
        @ use command <code>fcircle xc,yc,d,color</code>
869
        @ alternative: disk for a filled circle
869
        @ alternative: disk
870
        @ use command <code>fillcolor color</code> to set the fillcolor
870
        @ use command <code>fillcolor color</code> to set the fillcolor
871
        @ may be set <a href='#drag'>draggable</a> / <a href='#onclick'>onclick</a>
871
        @ may be set <a href='#drag'>draggable</a> / <a href='#onclick'>onclick</a>
872
        @ will shrink / expand on zoom out / zoom in
872
        @ will shrink / expand on zoom out / zoom in
873
        @%circle%size 400,400%xrange -10,10%yrange -10,10%filled%fillcolor lightblue%opacity 255,50%drag xy%circle 0,0,60,red%zoom red
873
        @%circle%size 400,400%xrange -10,10%yrange -10,10%filled%fillcolor lightblue%opacity 255,50%drag xy%circle 0,0,60,red%zoom red
874
        */
874
        */
Line 899... Line 899...
899
        case CIRCLES:
899
        case CIRCLES:
900
        /*
900
        /*
901
        @ circles color,xc1,yc1,r1,xc2,yc2,r2...xc_n,yc_n,r_n
901
        @ circles color,xc1,yc1,r1,xc2,yc2,r2...xc_n,yc_n,r_n
902
        @ <b>attention</b> r = radius in x-range (!)
902
        @ <b>attention</b> r = radius in x-range (!)
903
        @ use keyword <code>filled</code> or command <code>fcircles</code> to produce solid circles
903
        @ use keyword <code>filled</code> or command <code>fcircles</code> to produce solid circles
904
        @ alternative: disks for filled circles
904
        @ alternative: disks
905
        @ use command <code>fillcolor color</code> to set the fillcolor
905
        @ use command <code>fillcolor color</code> to set the fillcolor
906
        @ may be set <a href='#drag'>draggable</a> / <a href='#onclick'>onclick</a> (individually)
906
        @ may be set <a href='#drag'>draggable</a> / <a href='#onclick'>onclick</a> (individually)
907
        @ will shrink / expand on zoom out / zoom in
907
        @ will shrink / expand on zoom out / zoom in
908
        @%circles_drag%size 400,400%xrange -10,10%yrange -10,10%filled%fillcolor lightblue%opacity 255,50%drag xy%circles blue,0,0,2,2,2,3,-3,-3,3,3,3,4,3,-4,2%zoom red
908
        @%circles_drag%size 400,400%xrange -10,10%yrange -10,10%filled%fillcolor lightblue%opacity 255,50%drag xy%circles blue,0,0,2,2,2,3,-3,-3,3,3,3,4,3,-4,2%zoom red
909
        @%circles_onclick%size 400,400%xrange -10,10%yrange -10,10%filled%fillcolor lightblue%opacity 255,50%onclick%circles blue,0,0,2,2,2,3,-3,-3,3,3,3,4,3,-4,2%zoom red
909
        @%circles_onclick%size 400,400%xrange -10,10%yrange -10,10%filled%fillcolor lightblue%opacity 255,50%onclick%circles blue,0,0,2,2,2,3,-3,-3,3,3,3,4,3,-4,2%zoom red
Line 938... Line 938...
938
            if(use_dragstuff == 0 ){ use_dragstuff = 1; }
938
            if(use_dragstuff == 0 ){ use_dragstuff = 1; }
939
            break;
939
            break;
940
        case CLEARBUTTON:
940
        case CLEARBUTTON:
941
        /*
941
        /*
942
         @ clearbutton value
942
         @ clearbutton value
943
         @ alternative: <code>delete</code>
943
         @ alternative: delete
944
         @ alternative: <code>erase</code>
944
         @ alternative: erase
945
         @ adds a button to clear the <a href="#userdraw">userdraw</a> canvas with text ''value``
945
         @ adds a button to clear the <a href="#userdraw">userdraw</a> canvas with text ''value``
946
         @ <b>attention</b> command <code>clearbutton</code> is incompatible with <a href="#multidraw">multidraw</a> based drawings<br/>(in <code>multidraw</code> there is always a remove_object_button for every draw primitive)
946
         @ <b>attention</b> command <code>clearbutton</code> is incompatible with <a href="#multidraw">multidraw</a> based drawings<br/>(in <code>multidraw</code> there is always a remove_object_button for every draw primitive)
947
         @ 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
947
         @ 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
948
         @ uses the tooltip placeholder div element: may not be used with command <code>intooltip</code>
948
         @ uses the tooltip placeholder div element: may not be used with command <code>intooltip</code>
949
         @ use command <a href="#css">css</a> to style the button...
949
         @ use command <a href="#css">css</a> to style the button...
Line 1303... Line 1303...
1303
            break;
1303
            break;
1304
 
1304
 
1305
        case CURSOR:
1305
        case CURSOR:
1306
        /*
1306
        /*
1307
        @ cursor some CSS cursor_style
1307
        @ cursor some CSS cursor_style
1308
        @ alternative: <code>pointer</code>
1308
        @ alternative: pointer
1309
        @ style can be any valid CSS property value
1309
        @ style can be any valid CSS property value
1310
        @ choose from these types:<br />alias,all-scroll,auto,cell,context-menu,col-resize,copy,crosshair,default,e-resize,<br />ew-resize,grab,grabbing,help,move,n-resize,ne-resize,nesw-resize,ns-resize,nw-resize,<br />nwse-resize,no-drop,none,not-allowed,pointer,progress,row-resize,s-resize,se-resize,<br />sw-resize,text,url(myBall.cur),auto,vertical-text,w-resize,wait,zoom-in,zoom-out,initial
1310
        @ choose from these types:<br />alias,all-scroll,auto,cell,context-menu,col-resize,copy,crosshair,default,e-resize,<br />ew-resize,grab,grabbing,help,move,n-resize,ne-resize,nesw-resize,ns-resize,nw-resize,<br />nwse-resize,no-drop,none,not-allowed,pointer,progress,row-resize,s-resize,se-resize,<br />sw-resize,text,url(myBall.cur),auto,vertical-text,w-resize,wait,zoom-in,zoom-out,initial
1311
        @ note: wims will not check the validity of your cursor declaration
1311
        @ note: wims will not check the validity of your cursor declaration
1312
        @%cursor_css%size 400,400%xrange -10,10%yrange -10,10%cursor move%linewidth 3%drag xy%opacity 200,75%fcircles blue,-5,5,3,-4,-2,6,0,0,5,3,4,2,4,-5,4
1312
        @%cursor_css%size 400,400%xrange -10,10%yrange -10,10%cursor move%linewidth 3%drag xy%opacity 200,75%fcircles blue,-5,5,3,-4,-2,6,0,0,5,3,4,2,4,-5,4
1313
        */
1313
        */
Line 1315... Line 1315...
1315
            break;
1315
            break;
1316
 
1316
 
1317
        case CURVE:
1317
        case CURVE:
1318
        /*
1318
        /*
1319
         @ curve color,formula(x)
1319
         @ curve color,formula(x)
1320
         @ alternative: <code>plot color,formula(x)</code>
1320
         @ alternative: plot
1321
         @ use command <a href="#trange">trange</a> in parametric functions before <b>every</b> command curve / plot <code>trange -pi,pi<br />curve color,formula1(t),formula2(t)</code><br />A next parametric curve will only be correctly plot when trange is set again !<br/>this is a design flaw and not a feature...
1321
         @ use command <a href="#trange">trange</a> in parametric functions before <b>every</b> command curve / plot <code>trange -pi,pi<br />curve color,formula1(t),formula2(t)</code><br />A next parametric curve will only be correctly plot when trange is set again !<br/>this is a design flaw and not a feature...
1322
         @ use command <a href="#precision">precision</a> to increase the number of digits of the plotted points
1322
         @ use command <a href="#precision">precision</a> to increase the number of digits of the plotted points
1323
         @ use command <a href="#plotsteps">plotsteps</a> to increase / decrease the amount of plotted points (default 150)
1323
         @ use command <a href="#plotsteps">plotsteps</a> to increase / decrease the amount of plotted points (default 150)
1324
         @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
1324
         @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
1325
         @ if you need a plot beyond xrange / yrange, use <a href="#jsplot">jsplot</a> (command ''curve`` will only calculate points within the xrange)
1325
         @ if you need a plot beyond xrange / yrange, use <a href="#jsplot">jsplot</a> (command ''curve`` will only calculate points within the xrange)
Line 1787... Line 1787...
1787
            break;
1787
            break;
1788
 
1788
 
1789
        case FILLPATTERN:
1789
        case FILLPATTERN:
1790
        /*
1790
        /*
1791
        @ fillpattern grid | hatch | diamond | dot | image_url
1791
        @ fillpattern grid | hatch | diamond | dot | image_url
1792
        @ alternative: <code>settile image_url</code> (e.g. flydraw syntax for filling using a tiled image)
1792
        @ alternative: settile image_url
1793
        @ use a pattern as fillstyle
1793
        @ use a pattern as fillstyle
1794
        @ suitable for all fillable object including the <a href="#userdraw">userdraw objects' family</a>
1794
        @ suitable for all fillable object including the <a href="#userdraw">userdraw objects' family</a>
1795
        @ note: do not use the ''f`` for a fillable object : this is used exclusively for solid colour filling.
1795
        @ note: do not use the ''f`` for a fillable object : this is used exclusively for solid colour filling.
1796
        @ the fillcolor is set by the object command, for example:<br /><code>size 370,370<br />xrange -5,5<br />yrange -5,5<br />opacity 165,150<br />fillpattern grid<br />fcircle -6,3,160,blue<br />fillpattern dot<br />fcircle -3,-3,160,red<br />fillpattern hatch<br />fcircle 0,3,160,green<br />filpattern diamond<br />fcircle 3,-3,160,cyan<br />userdraw dotfill,blue<br />zoom red</code>
1796
        @ the fillcolor is set by the object command, for example:<br /><code>size 370,370<br />xrange -5,5<br />yrange -5,5<br />opacity 165,150<br />fillpattern grid<br />fcircle -6,3,160,blue<br />fillpattern dot<br />fcircle -3,-3,160,red<br />fillpattern hatch<br />fcircle 0,3,160,green<br />filpattern diamond<br />fcircle 3,-3,160,cyan<br />userdraw dotfill,blue<br />zoom red</code>
1797
        @ the pattern dimensions are hardcoded (linewidth, radius,dx,dy are fixed)
1797
        @ the pattern dimensions are hardcoded (linewidth, radius,dx,dy are fixed)
Line 1862... Line 1862...
1862
            }
1862
            }
1863
        break;
1863
        break;
1864
        case FLOODFILL:
1864
        case FLOODFILL:
1865
        /*
1865
        /*
1866
        @ floodfill x,y,color
1866
        @ floodfill x,y,color
1867
        @ alternative: <code>fill x,y,color</code>
1867
        @ alternative: fill
1868
        @ fill the region of point (x:y) with color 'color'
1868
        @ fill the region of point (x:y) with color 'color'
1869
        @ any other color or size of picture (borders of picture) will act as border to the bucket fill
1869
        @ any other color or size of picture (borders of picture) will act as border to the bucket fill
1870
        @ use this command after all boundary objects are declared.
1870
        @ use this command after all boundary objects are declared.
1871
        @ Use command <code>userdraw clickfill,color</code> for user click driven flood fill.
1871
        @ Use command <code>userdraw clickfill,color</code> for user click driven flood fill.
1872
        @ use command <a href="#canvastype">canvastype </a> to fill another canvas (default should be fine: DRAG_CANVAS = 5)
1872
        @ use command <a href="#canvastype">canvastype </a> to fill another canvas (default should be fine: DRAG_CANVAS = 5)
Line 2030... Line 2030...
2030
        break;
2030
        break;
2031
 
2031
 
2032
        case HALFLINE:
2032
        case HALFLINE:
2033
        /*
2033
        /*
2034
        @ demiline x1,y1,x2,y2,color
2034
        @ demiline x1,y1,x2,y2,color
2035
        @ alternative: <code>halfline</code>
2035
        @ alternative: halfline
2036
        @ draws a halfline starting in (x1:y1) and through (x2:y2) in color 'color' (colorname or hex)
2036
        @ draws a halfline starting in (x1:y1) and through (x2:y2) in color 'color' (colorname or hex)
2037
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
2037
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
2038
        @%halfline%size 400,400%xrange -10,10%yrange -10,10%halfline -5,5,0,0,red%halfline -5,-5,0,0,blue
2038
        @%halfline%size 400,400%xrange -10,10%yrange -10,10%halfline -5,5,0,0,red%halfline -5,-5,0,0,blue
2039
        */
2039
        */
2040
            for(i=0;i<5;i++){
2040
            for(i=0;i<5;i++){
Line 2101... Line 2101...
2101
            break;
2101
            break;
2102
 
2102
 
2103
        case HALFLINES:
2103
        case HALFLINES:
2104
        /*
2104
        /*
2105
        @ demilines color,x1,y1,x2,y2,....
2105
        @ demilines color,x1,y1,x2,y2,....
2106
        @ alternative: <code>halflines</code>
2106
        @ alternative: halflines
2107
        @ draws halflines starting in (x1:y1) and through (x2:y2) in color 'color' (colorname or hex) etc
2107
        @ draws halflines starting in (x1:y1) and through (x2:y2) in color 'color' (colorname or hex) etc
2108
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> indiviually
2108
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> indiviually
2109
        @%halflines%size 400,400%xrange -10,10%yrange -10,10%halflines red,-5,5,0,0,-5,-5,0,0
2109
        @%halflines%size 400,400%xrange -10,10%yrange -10,10%halflines red,-5,5,0,0,-5,-5,0,0
2110
        */
2110
        */
2111
            stroke_color=get_color(infile,0);
2111
            stroke_color=get_color(infile,0);
Line 2211... Line 2211...
2211
        break;
2211
        break;
2212
 
2212
 
2213
        case HLINE:
2213
        case HLINE:
2214
        /*
2214
        /*
2215
        @ hline x,y,color
2215
        @ hline x,y,color
2216
        @ alternative: <code>horizontalline</code>
2216
        @ alternative: horizontalline
2217
        @ draw a horizontal line through point (x:y) in color 'color'
2217
        @ draw a horizontal line through point (x:y) in color 'color'
2218
        @ or use command <a href='#curve'>curve color,formula</a> to draw the line (uses more points to draw the line; is however better draggable)
2218
        @ or use command <a href='#curve'>curve color,formula</a> to draw the line (uses more points to draw the line; is however better draggable)
2219
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
2219
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
2220
        @%hline%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%hline 0,0,red%dhline 0,5,blue
2220
        @%hline%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%hline 0,0,red%dhline 0,5,blue
2221
        */
2221
        */
Line 2243... Line 2243...
2243
            break;
2243
            break;
2244
 
2244
 
2245
        case HLINES:
2245
        case HLINES:
2246
        /*
2246
        /*
2247
        @ hlines color,x1,y1,x2,y2,...
2247
        @ hlines color,x1,y1,x2,y2,...
2248
        @ alternative: <code>horizontallines</code>
2248
        @ alternative: horizontallines
2249
        @ draw horizontal lines through points (x1:y1)...(xn:yn) in color 'color'
2249
        @ draw horizontal lines through points (x1:y1)...(xn:yn) in color 'color'
2250
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
2250
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
2251
        @%hlines%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%hlines red,0,0,0,5,0,-5
2251
        @%hlines%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%hlines red,0,0,0,5,0,-5
2252
        */
2252
        */
2253
            stroke_color=get_color(infile,0); /* how nice: now the color comes first...*/
2253
            stroke_color=get_color(infile,0); /* how nice: now the color comes first...*/
Line 2446... Line 2446...
2446
            break;
2446
            break;
2447
 
2447
 
2448
        case JSCURVE:
2448
        case JSCURVE:
2449
        /*
2449
        /*
2450
         @ jscurve color,formula1(x),formula2(x),formula3(x),...
2450
         @ jscurve color,formula1(x),formula2(x),formula3(x),...
2451
         @ alternative: <code>jsplot color,formula(x)</code>
2451
         @ alternative: jsplot
2452
         @ alternative: <code>userdraw function,color</code>
2452
         @ alternative: userdraw
2453
         @ your function will be plotted by the javascript engine of the client browser
2453
         @ your function will be plotted by the javascript engine of the client browser
2454
         @ if <a href='trange'>trange</a> is defined, the two functions will be plotted parametric<br /><b>note</b>: use <i>x</i> as variable...and not <i>t</i>. Use keyword <a href='#animate'>animate</a> to animate a point on the curve
2454
         @ if <a href='trange'>trange</a> is defined, the two functions will be plotted parametric<br /><b>note</b>: use <i>x</i> as variable...and not <i>t</i>. Use keyword <a href='#animate'>animate</a> to animate a point on the curve
2455
         @ use only basic math in your curve: <code>sqrt,^,asin,acos,atan,log,pi,abs,sin,cos,tan,e</code>
2455
         @ use only basic math in your curve: <code>sqrt,^,asin,acos,atan,log,pi,abs,sin,cos,tan,e</code>
2456
         @ use parenthesis and rawmath: use 2*x instead of 2x ; use 2^(sin(x))...etc etc (use error console to debug any errors...)
2456
         @ use parenthesis and rawmath: use 2*x instead of 2x ; use 2^(sin(x))...etc etc (use error console to debug any errors...)
2457
         @ <b>attention</b>: last ''precision`` command in the canvasdraw script determines the calculation precision of the javascript curve plot !
2457
         @ <b>attention</b>: last ''precision`` command in the canvasdraw script determines the calculation precision of the javascript curve plot !
Line 2599... Line 2599...
2599
            break;
2599
            break;
2600
 
2600
 
2601
        case KILLTRANSLATION:
2601
        case KILLTRANSLATION:
2602
        /*
2602
        /*
2603
         @ killtranslation
2603
         @ killtranslation
2604
         @ alternative: <code>killtranslate</code>
2604
         @ alternative: killtranslate
2605
         @ note: a active linear or affine transformation will not be 100% reset...only tx=0,ty=0
2605
         @ note: a active linear or affine transformation will not be 100% reset...only tx=0,ty=0
2606
         @ resets the translation matrix a,b,c,d,tx,ty to a,b,c,d,0,0
2606
         @ resets the translation matrix a,b,c,d,tx,ty to a,b,c,d,0,0
2607
        */
2607
        */
2608
            affine_matrix[4] = 0.0;
2608
            affine_matrix[4] = 0.0;
2609
            affine_matrix[5] = 0.0;
2609
            affine_matrix[5] = 0.0;
2610
            break;
2610
            break;
2611
        case LATEX:
2611
        case LATEX:
2612
        /*
2612
        /*
2613
         @ latex x,y,tex string
2613
         @ latex x,y,tex string
2614
         @ alternative:math x,y,tex string
2614
         @ alternative: math
2615
         @ you may also use command <a href="#mathml">mathml</a> for xml strings generated with wims commmand ''mathmlmath`` (will not work on KaTeX enabled WIMS)
2615
         @ you may also use command <a href="#mathml">mathml</a> for xml strings generated with wims commmand ''mathmlmath`` (will not work on KaTeX enabled WIMS)
2616
         @ transformation commands <a href='#affine'>affine</a>, <a href='#translation'>translation</a> and <a href='#rotate'>rotate</a> are supported.(onclick and drag will work)
2616
         @ transformation commands <a href='#affine'>affine</a>, <a href='#translation'>translation</a> and <a href='#rotate'>rotate</a> are supported.(onclick and drag will work)
2617
         @ can be set onclick: <code>javascript:read_dragdrop();</code> will return click numbers of mathml-objects<br />if 4 clickable object are drawn, the reply could be 1,0,1,0 ... meaning clicked on the first and third object
2617
         @ can be set onclick: <code>javascript:read_dragdrop();</code> will return click numbers of mathml-objects<br />if 4 clickable object are drawn, the reply could be 1,0,1,0 ... meaning clicked on the first and third object
2618
         @ can be set draggable:<code>javascript:read_dragdrop();</code> will return all coordinates in the same order as the canvas script: unmoved object will have their original coordinates...
2618
         @ can be set draggable:<code>javascript:read_dragdrop();</code> will return all coordinates in the same order as the canvas script: unmoved object will have their original coordinates...
2619
         @ can be moved/rotated with command <a href='#slider'>slider</a>
2619
         @ can be moved/rotated with command <a href='#slider'>slider</a>
Line 3297... Line 3297...
3297
            fprintf(js_include_file,"var multifillopacity = [\"%s\"];",temp);
3297
            fprintf(js_include_file,"var multifillopacity = [\"%s\"];",temp);
3298
            break;
3298
            break;
3299
        case MULTISNAPTOGRID:
3299
        case MULTISNAPTOGRID:
3300
        /*
3300
        /*
3301
         @ multisnaptogrid 0,1,1
3301
         @ multisnaptogrid 0,1,1
3302
         @ alternative: <code>multisnap</code>
3302
         @ alternative: multisnap
3303
         @ meaning draw objects no. 2 (circle) and 3 (segments), in the list of command like <code>multifill points,circle,segments</code>, will snap to the xy-grid (default 1 in x/y-coordinate system: see command <a href='#snaptogrid'>snaptogrid</a>)
3303
         @ meaning draw objects no. 2 (circle) and 3 (segments), in the list of command like <code>multifill points,circle,segments</code>, will snap to the xy-grid (default 1 in x/y-coordinate system: see command <a href='#snaptogrid'>snaptogrid</a>)
3304
         @ freehand drawing...specify precision for reply: all objects snap to grid <code>multisnaptogrid 1,1,1,...</code>
3304
         @ freehand drawing...specify precision for reply: all objects snap to grid <code>multisnaptogrid 1,1,1,...</code>
3305
         @ only the xy-values snap_to_grid: all objects snap to grid <code>multisnaptogrid 1,1,1,...</code>
3305
         @ only the xy-values snap_to_grid: all objects snap to grid <code>multisnaptogrid 1,1,1,...</code>
3306
         @ only the x-values snap_to_grid: all objects snap to x-grid <code>multisnaptogrid 2,2,2,...</code>
3306
         @ only the x-values snap_to_grid: all objects snap to x-grid <code>multisnaptogrid 2,2,2,...</code>
3307
         @ only the y-values snap_to_grid: all objects snap to y-grid <code>multisnaptogrid 3,3,3,...</code>
3307
         @ only the y-values snap_to_grid: all objects snap to y-grid <code>multisnaptogrid 3,3,3,...</code>
Line 3352... Line 3352...
3352
            break;
3352
            break;
3353
 
3353
 
3354
        case MULTIUSERINPUT:
3354
        case MULTIUSERINPUT:
3355
        /*
3355
        /*
3356
        @ multiuserinput 0,1,1,0
3356
        @ multiuserinput 0,1,1,0
3357
        @ alternative: <code>multiinput</code>
3357
        @ alternative: multiinput
3358
        @ meaning, when the command ''multidraw`` is used <code>multidraw circles,points,lines,triangles</code><br />objects ''points`` and ''lines`` may additionally be ''drawn`` by direct input (inputfields)<br/>all other objects must be drawn with a mouse
3358
        @ meaning, when the command ''multidraw`` is used <code>multidraw circles,points,lines,triangles</code><br />objects ''points`` and ''lines`` may additionally be ''drawn`` by direct input (inputfields)<br/>all other objects must be drawn with a mouse
3359
        @ in case of circle | circles a third inputfield for Radius (R) is added. 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
3359
        @ in case of circle | circles a third inputfield for Radius (R) is added. 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
3360
        @ 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...
3360
        @ 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...
3361
        @ in case of a triangle | poly3, three inputfields are provided.
3361
        @ in case of a triangle | poly3, three inputfields are provided.
3362
        @ in case of ''text`` and ''multiuserinput=1, 3`` inputfields will be shown: ''x,y,text``
3362
        @ in case of ''text`` and ''multiuserinput=1, 3`` inputfields will be shown: ''x,y,text``
Line 3373... Line 3373...
3373
            temp = str_replace(temp,",","\",\"");
3373
            temp = str_replace(temp,",","\",\"");
3374
            fprintf(js_include_file,"var multiuserinput = [\"%s\"];",temp);
3374
            fprintf(js_include_file,"var multiuserinput = [\"%s\"];",temp);
3375
            break;
3375
            break;
3376
        case NORESET:
3376
        case NORESET:
3377
        /*
3377
        /*
3378
        @ killreset
3378
        @ noreset
3379
        @ alternative: noreset
3379
        @ alternative: killreset
3380
        @ keyword
3380
        @ keyword
3381
        @ may come in handy if canvas script code is generated using loops
3381
        @ may come in handy if canvas script code is generated using loops
3382
        @ if used the following properties will remain to be valid<br /><ul><li>filled</li><li>dash settings</li><li>onclick or drag settings</li><li>centering or offset</li></ul>
3382
        @ if used the following properties will remain to be valid<br /><ul><li>filled</li><li>dash settings</li><li>onclick or drag settings</li><li>centering or offset</li></ul>
3383
        @ if used again, these properies will be reset to the default values and normal behaviour is continued (e.g. the above properties will be reset after 'use' on a canvas object)
3383
        @ if used again, these properies will be reset to the default values and normal behaviour is continued (e.g. the above properties will be reset after 'use' on a canvas object)
3384
        @ etc etc
3384
        @ etc etc
Line 3503... Line 3503...
3503
 
3503
 
3504
        case OPACITY:
3504
        case OPACITY:
3505
        /*
3505
        /*
3506
        @ opacity [0-255],[0-255]
3506
        @ opacity [0-255],[0-255]
3507
        @ opacity [0.0 - 1.0],[0.0 - 1.0]
3507
        @ opacity [0.0 - 1.0],[0.0 - 1.0]
3508
        @ alternative: <code>transparent</code>
3508
        @ alternative: transparent
3509
        @ first item is stroke opacity, second is fill opacity
3509
        @ first item is stroke opacity, second is fill opacity
3510
        @%opacity%size 400,400%xrange -10,10%yrange -10,10%opacity 255,0%fcircle -10,0,100,blue%opacity 250,50%fcircle -5,0,100,blue%opacity 200,100%fcircle 0,0,100,blue%opacity 150,150%fcircle 5,0,100,blue%opacity 100,200%fcircle 10,0,100,blue
3510
        @%opacity%size 400,400%xrange -10,10%yrange -10,10%opacity 255,0%fcircle -10,0,100,blue%opacity 250,50%fcircle -5,0,100,blue%opacity 200,100%fcircle 0,0,100,blue%opacity 150,150%fcircle 5,0,100,blue%opacity 100,200%fcircle 10,0,100,blue
3511
        */
3511
        */
3512
            for(i = 0 ; i<2;i++){
3512
            for(i = 0 ; i<2;i++){
3513
                switch(i){
3513
                switch(i){
Line 4349... Line 4349...
4349
 
4349
 
4350
 
4350
 
4351
        case SEGMENT:
4351
        case SEGMENT:
4352
        /*
4352
        /*
4353
        @ segment x1,y1,x2,y2,color
4353
        @ segment x1,y1,x2,y2,color
4354
        @ alternative: <code>seg</code>
4354
        @ alternative: seg
4355
        @ draw a line segment between points (x1:y1)--(x2:y2) in color ''color``
4355
        @ draw a line segment between points (x1:y1)--(x2:y2) in color ''color``
4356
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
4356
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
4357
        @%segment_onclick%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%segment 1,1,-9,3,green
4357
        @%segment_onclick%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%segment 1,1,-9,3,green
4358
        @%segment_drag_y%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag y%segment 1,1,-9,3,green
4358
        @%segment_drag_y%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag y%segment 1,1,-9,3,green
4359
        */
4359
        */
Line 4384... Line 4384...
4384
            break;
4384
            break;
4385
 
4385
 
4386
        case SEGMENTS:
4386
        case SEGMENTS:
4387
        /*
4387
        /*
4388
        @ segments color,x1,y1,x2,y2,...,x_n,y_n
4388
        @ segments color,x1,y1,x2,y2,...,x_n,y_n
4389
        @ alternative: <code>segs</code>
4389
        @ alternative: segs
4390
        @ draw multiple segments between points (x1:y1)--(x2:y2).....and... (x_n-1:y_n-1)--(x_n:y_n) in color ''color``
4390
        @ draw multiple segments between points (x1:y1)--(x2:y2).....and... (x_n-1:y_n-1)--(x_n:y_n) in color ''color``
4391
        @ use command ''linewidth int`` to adjust size
4391
        @ use command ''linewidth int`` to adjust size
4392
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
4392
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually (!)
4393
        @%segments_onclick%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%segments green,1,1,3,3,0,0,-3,3,1,1,4,-1,-5,5,-3,-1
4393
        @%segments_onclick%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%segments green,1,1,3,3,0,0,-3,3,1,1,4,-1,-5,5,-3,-1
4394
        @%segments_drag_y%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag y%segments green,1,1,3,3,0,0,-3,3,1,1,4,-1,-5,5,-3,-1
4394
        @%segments_drag_y%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag y%segments green,1,1,3,3,0,0,-3,3,1,1,4,-1,-5,5,-3,-1
Line 4600... Line 4600...
4600
            /* sgraph(canvas_type,precision,xmajor,ymajor,xminor,yminor,majorcolor,minorcolor,fontfamily,opacity)*/
4600
            /* sgraph(canvas_type,precision,xmajor,ymajor,xminor,yminor,majorcolor,minorcolor,fontfamily,opacity)*/
4601
            break;
4601
            break;
4602
        case SNAPTOFUNCTION:
4602
        case SNAPTOFUNCTION:
4603
        /*
4603
        /*
4604
        @ snaptofunction some_function_in_x,some_funtion_in_y
4604
        @ snaptofunction some_function_in_x,some_funtion_in_y
4605
        @ alternative: <code>snaptofun some_function_in_x,some_funtion_in_y</code>
4605
        @ alternative: snaptofun
4606
        @ the next object will snap to the calculated values
4606
        @ the next object will snap to the calculated values
4607
        @ note: snaptofun is probably not really useful feature...
4607
        @ note: snaptofun is probably not really useful feature...
4608
        @ if you want only modification of y-values,just use: <code>snaptofunction x,5*sin(1/y)</code>
4608
        @ if you want only modification of y-values,just use: <code>snaptofunction x,5*sin(1/y)</code>
4609
        @ if you want only modification of x-values,just use: <code>snaptofunction 5*sin(1/x),y</code>
4609
        @ if you want only modification of x-values,just use: <code>snaptofunction 5*sin(1/x),y</code>
4610
        @ for now only one instance of ''snaptofunction`` is allowed
4610
        @ for now only one instance of ''snaptofunction`` is allowed
Line 5006... Line 5006...
5006
 
5006
 
5007
 
5007
 
5008
        case TRANGE:
5008
        case TRANGE:
5009
        /*
5009
        /*
5010
        @ trange tmin,tmax
5010
        @ trange tmin,tmax
5011
        @ alternative: <code>ranget</code>
5011
        @ alternative: ranget
5012
        @ default -2,2
5012
        @ default -2,2
5013
        */
5013
        */
5014
            use_parametric = TRUE;
5014
            use_parametric = TRUE;
5015
            for(i = 0 ; i<2; i++){
5015
            for(i = 0 ; i<2; i++){
5016
                switch(i){
5016
                switch(i){
Line 5022... Line 5022...
5022
            if(tmin >= tmax ){canvas_error(" trange is not OK: tmin &lt; tmax!\n");}
5022
            if(tmin >= tmax ){canvas_error(" trange is not OK: tmin &lt; tmax!\n");}
5023
            break;
5023
            break;
5024
        case TRANSLATION:
5024
        case TRANSLATION:
5025
        /*
5025
        /*
5026
         @ translation tx,ty
5026
         @ translation tx,ty
5027
         @ alternative: <code>translate</code>
5027
         @ alternative: translate
5028
         @ will translate the next objects tx in xrange and ty in yrange
5028
         @ will translate the next objects tx in xrange and ty in yrange
5029
         @ use command ''killtranstation`` to end the command
5029
         @ use command ''killtranstation`` to end the command
5030
         @%translation%size 400,400%xrange -10,10%yrange -10,10%linewidth 1%fillpattern grid%ftriangle -6,6,8,6,5,1,blue%translation 2,2%ftriangle -6,6,8,6,5,1,red
5030
         @%translation%size 400,400%xrange -10,10%yrange -10,10%linewidth 1%fillpattern grid%ftriangle -6,6,8,6,5,1,blue%translation 2,2%ftriangle -6,6,8,6,5,1,red
5031
        */
5031
        */
5032
            for(i = 0 ; i<2;i++){
5032
            for(i = 0 ; i<2;i++){
Line 5276... Line 5276...
5276
        break;
5276
        break;
5277
 
5277
 
5278
        case USERINPUT:
5278
        case USERINPUT:
5279
        /*
5279
        /*
5280
         @ userinput function inputfield
5280
         @ userinput function inputfield
5281
         @ alternative: <code>userinput_function</code>
5281
         @ alternative: userinput_function
5282
         @ alternative: <code>userinput_xy</code>
5282
         @ alternative: userinput_xy
5283
         @ ''inputfield`` is only usable in combination with some ''userdraw draw_type``
5283
         @ ''inputfield`` is only usable in combination with some ''userdraw draw_type``
5284
         @ note: the input fields are not cleared after the object is drawn...be aware of multiple idential drawings (many clicks on the ''ok`` button)
5284
         @ note: the input fields are not cleared after the object is drawn...be aware of multiple idential drawings (many clicks on the ''ok`` button)
5285
         @ ''userinput function`` may be used any time (e.g. without userdraw)
5285
         @ ''userinput function`` may be used any time (e.g. without userdraw)
5286
         @ multiple ''userinput function`` commands may be used.
5286
         @ multiple ''userinput function`` commands may be used.
5287
         @ use command <code>functionlabel some_string</code> to define the inputfield text: default value "f(x)="
5287
         @ use command <code>functionlabel some_string</code> to define the inputfield text: default value "f(x)="
Line 5344... Line 5344...
5344
            break;
5344
            break;
5345
 
5345
 
5346
        case USERINPUT_FUNCTION:
5346
        case USERINPUT_FUNCTION:
5347
        /*
5347
        /*
5348
        @ userinput_function
5348
        @ userinput_function
5349
        @ alternative: userinput function
5349
        @ alternative: userinput
5350
        @ keyword (no arguments required)
5350
        @ keyword (no arguments required)
5351
        @ if set, a inputfield will be added to the page
5351
        @ if set, a inputfield will be added to the page
5352
        @ repeat keyword for more function input fields
5352
        @ repeat keyword for more function input fields
5353
        @ the userinput value will be plotted in the canvas
5353
        @ the userinput value will be plotted in the canvas
5354
        @ this value may be read with <code>read_canvas()</code>. <br />for do it yourself js-scripters: If this is the first inputfield in the script, its id is canvas_input0
5354
        @ this value may be read with <code>read_canvas()</code>. <br />for do it yourself js-scripters: If this is the first inputfield in the script, its id is canvas_input0
Line 5375... Line 5375...
5375
            break;
5375
            break;
5376
 
5376
 
5377
        case VLINE:
5377
        case VLINE:
5378
        /*
5378
        /*
5379
        @ vline x,y,color
5379
        @ vline x,y,color
5380
        @ alternative: <code>verticalline</code>
5380
        @ alternative: verticalline
5381
        @ draw a vertical line through point (x:y) in color 'color'
5381
        @ draw a vertical line through point (x:y) in color 'color'
5382
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
5382
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a>
5383
        @%vline%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%vline 0,0,red%onclick%vline 1,0,orange%onclick%vline 2,0,blue%onclick%vline 3,0,green
5383
        @%vline%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%vline 0,0,red%onclick%vline 1,0,orange%onclick%vline 2,0,blue%onclick%vline 3,0,green
5384
        */
5384
        */
5385
            for(i=0;i<3;i++) {
5385
            for(i=0;i<3;i++) {
Line 5405... Line 5405...
5405
            break;
5405
            break;
5406
 
5406
 
5407
        case VLINES:
5407
        case VLINES:
5408
        /*
5408
        /*
5409
        @ vlines color,x1,y1,x2,y2....
5409
        @ vlines color,x1,y1,x2,y2....
5410
        @ alternative: <code>verticallines</code>
5410
        @ alternative: verticallines
5411
        @ draw vertical lines through points (x1:y1),(x2:y2)... in color 'color'
5411
        @ draw vertical lines through points (x1:y1),(x2:y2)... in color 'color'
5412
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
5412
        @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> individually
5413
        @%vlines%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%vlines red,1,0,2,0,3,0,4,0
5413
        @%vlines%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%vlines red,1,0,2,0,3,0,4,0
5414
        */
5414
        */
5415
            stroke_color=get_color(infile,0); /* how nice: now the color comes first...*/
5415
            stroke_color=get_color(infile,0); /* how nice: now the color comes first...*/
Line 5469... Line 5469...
5469
            break;
5469
            break;
5470
 
5470
 
5471
        case X_AXIS_STRINGS:
5471
        case X_AXIS_STRINGS:
5472
        /*
5472
        /*
5473
         @ xaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
5473
         @ xaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
5474
         @ alternative: <code>xaxistext num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n</code>
5474
         @ alternative: xaxistext
5475
         @ usable for commands <a href="#numberline">numberline</a> and <a href="#grid">grid</a> or combinations thereof
5475
         @ usable for commands <a href="#numberline">numberline</a> and <a href="#grid">grid</a> or combinations thereof
5476
         @ use these x-axis num1...num_n values instead of default xmin...xmax
5476
         @ use these x-axis num1...num_n values instead of default xmin...xmax
5477
         @ in case of command ''grid``. there is no need to use keyword <a href="#axisnumbering">axisnumbering</a>
5477
         @ in case of command ''grid``. there is no need to use keyword <a href="#axisnumbering">axisnumbering</a>
5478
         @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a>
5478
         @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a>
5479
         @ use command ''fontcolor``, ''fontfamily`` to adjust font <br />defaults: black,12,Arial<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>)
5479
         @ use command ''fontcolor``, ''fontfamily`` to adjust font <br />defaults: black,12,Arial<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>)
Line 5490... Line 5490...
5490
            fprintf(js_include_file,"x_strings[%d] = [\"%s\"];x_strings_up[%d] = null;",use_axis_numbering,temp,use_axis_numbering);
5490
            fprintf(js_include_file,"x_strings[%d] = [\"%s\"];x_strings_up[%d] = null;",use_axis_numbering,temp,use_axis_numbering);
5491
            break;
5491
            break;
5492
        case X_AXIS_STRINGS_UP:
5492
        case X_AXIS_STRINGS_UP:
5493
        /*
5493
        /*
5494
         @ xaxisup num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
5494
         @ xaxisup num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
5495
         @ alternative: <code>xaxistextup num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n</code>
5495
         @ alternative: xaxistextup
5496
         @ the text will be rotated 90&deg; up
5496
         @ the text will be rotated 90&deg; up
5497
         @ no need to use keyword <a href="#axisnumbering">axisnumbering</a>
5497
         @ no need to use keyword <a href="#axisnumbering">axisnumbering</a>
5498
         @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a>
5498
         @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a>
5499
         @ use these x-axis num1...num_n values instead of default xmin...xmax
5499
         @ use these x-axis num1...num_n values instead of default xmin...xmax
5500
         @ use command ''fontcolor``, <a href="#fontfamily">fontfamily</a> to adjust font <br />defaults: black,12,Arial<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>)
5500
         @ use command ''fontcolor``, <a href="#fontfamily">fontfamily</a> to adjust font <br />defaults: black,12,Arial<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>)
Line 5551... Line 5551...
5551
            break;
5551
            break;
5552
 
5552
 
5553
        case XRANGE:
5553
        case XRANGE:
5554
        /*
5554
        /*
5555
        @ xrange xmin,xmax
5555
        @ xrange xmin,xmax
5556
        @ alternative: <code>rangex</code>
5556
        @ alternative: rangex
5557
        @ if not given: 0,xsize (eg in pixels)
5557
        @ if not given: 0,xsize (eg in pixels)
5558
        */
5558
        */
5559
            for(i = 0 ; i<2; i++){
5559
            for(i = 0 ; i<2; i++){
5560
                switch(i){
5560
                switch(i){
5561
                    case 0: xmin = get_real(infile,0);break;
5561
                    case 0: xmin = get_real(infile,0);break;
Line 5720... Line 5720...
5720
 
5720
 
5721
 
5721
 
5722
        case Y_AXIS_STRINGS:
5722
        case Y_AXIS_STRINGS:
5723
        /*
5723
        /*
5724
         @ yaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
5724
         @ yaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n
5725
         @ alternative: <code>yaxistext num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n</code>
5725
         @ alternative: yaxistext
5726
         @ use command ''fontcolor``, ''fontfamily`` to adjust font <br />defaults: black,12,Arial<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>)
5726
         @ use command ''fontcolor``, ''fontfamily`` to adjust font <br />defaults: black,12,Arial<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>)
5727
         @ no need to use keyword <a href="#axisnumbering">axisnumbering</a>
5727
         @ no need to use keyword <a href="#axisnumbering">axisnumbering</a>
5728
         @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a>
5728
         @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a>
5729
         @ use these y-axis num1...num_n values instead of default ymin...ymax
5729
         @ use these y-axis num1...num_n values instead of default ymin...ymax
5730
         @ a javascript error message will flag non-matching value:name pairs
5730
         @ a javascript error message will flag non-matching value:name pairs
Line 5789... Line 5789...
5789
         break;
5789
         break;
5790
 
5790
 
5791
        case YRANGE:
5791
        case YRANGE:
5792
        /*
5792
        /*
5793
        @ yrange ymin,ymax
5793
        @ yrange ymin,ymax
5794
        @ alternative: <code>rangey</code>
5794
        @ alternative: rangey
5795
        @ if not given 0,ysize (eg in pixels)
5795
        @ if not given 0,ysize (eg in pixels)
5796
        */
5796
        */
5797
            for(i = 0 ; i<2; i++){
5797
            for(i = 0 ; i<2; i++){
5798
                switch(i){
5798
                switch(i){
5799
                    case 0: ymin = get_real(infile,0);break;
5799
                    case 0: ymin = get_real(infile,0);break;