Rev 16828 | Rev 16834 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16828 | Rev 16832 | ||
---|---|---|---|
Line 328... | Line 328... | ||
328 | /* |
328 | /* |
329 | @ arc xc,yc,x-width,y-height,start_angle,end_angle,color |
329 | @ arc xc,yc,x-width,y-height,start_angle,end_angle,color |
330 | @ may be set ''onclick`` or ''drag xy`` |
330 | @ may be set ''onclick`` or ''drag xy`` |
331 | @ compatible with ''flydraw`` |
331 | @ compatible with ''flydraw`` |
332 | @ attention: width & height in x/y-range |
332 | @ attention: width & height in x/y-range |
333 | @ for arrow hats on an arc, see command <a href='#arcarrow'>arcarrow or arrowarc</a> |
333 | @ for arrow hats on an arc, see command <a href='#arcarrow'>arcarrow or arrowarc</a> |
334 | @ better use command <a href='#angle'>angle</a> for use with a <a href='#slider'>slider</a> |
334 | @ better use command <a href='#angle'>angle</a> for use with a <a href='#slider'>slider</a> |
335 | @%arc%size 400,400%xrange -10,10%yrange -10,10%arc 0,0,4,4,10,135,red |
335 | @%arc%size 400,400%xrange -10,10%yrange -10,10%arc 0,0,4,4,10,135,red |
336 | @%arc_filled%size 400,400%xrange -10,10%yrange -10,10%opacity 255,60%filled%fillcolor green%arc 0,0,4,4,10,135,red |
336 | @%arc_filled%size 400,400%xrange -10,10%yrange -10,10%opacity 255,60%filled%fillcolor green%arc 0,0,4,4,10,135,red |
337 | */ |
337 | */ |
338 | for(i=0;i<7;i++){ |
338 | for(i=0;i<7;i++){ |
Line 3175... | Line 3175... | ||
3175 | if(strstr(temp,"text") != NULL){ |
3175 | if(strstr(temp,"text") != NULL){ |
3176 | js_function[JS_SAFE_EVAL] = 1; |
3176 | js_function[JS_SAFE_EVAL] = 1; |
3177 | js_function[DRAW_SUBSUP] = 1; |
3177 | js_function[DRAW_SUBSUP] = 1; |
3178 | } |
3178 | } |
3179 | if(strstr(temp,"function") != NULL){ |
3179 | if(strstr(temp,"function") != NULL){ |
3180 | int funs = count_substring(temp, "function"); |
3180 | int pp, funs = count_substring(temp, "function"); |
3181 | js_function[JS_SAFE_EVAL] = 1; |
3181 | js_function[JS_SAFE_EVAL] = 1; |
3182 | js_function[JS_RAWMATH] = 1; |
3182 | js_function[JS_RAWMATH] = 1; |
3183 | js_function[DRAW_JSFUNCTION] = 1; |
3183 | js_function[DRAW_JSFUNCTION] = 1; |
3184 | js_function[JS_MATH] = 1; |
3184 | js_function[JS_MATH] = 1; |
3185 | js_function[JS_PLOT] = 1; |
3185 | js_function[JS_PLOT] = 1; |
3186 | for( |
3186 | for(pp = 0 ; pp< funs ;pp++){ |
3187 | add_input_jsfunction(css_class,function_label,input_cnt,stroke_color,stroke_opacity,line_width,use_dashed,dashtype[0],dashtype[1],font_size); |
3187 | add_input_jsfunction(css_class,function_label,input_cnt,stroke_color,stroke_opacity,line_width,use_dashed,dashtype[0],dashtype[1],font_size); |
3188 | input_cnt++; |
3188 | input_cnt++; |
3189 | jsplot_cnt++; |
3189 | jsplot_cnt++; |
3190 | } |
3190 | } |
3191 | fprintf(js_include_file,"if(typeof(all_jsplots) !== 'number'){var all_jsplots;};all_jsplots = %d;function redraw_userdraw(){redraw_jsplot();return;};",jsplot_cnt); |
3191 | fprintf(js_include_file,"if(typeof(all_jsplots) !== 'number'){var all_jsplots;};all_jsplots = %d;function redraw_userdraw(){redraw_jsplot();return;};",jsplot_cnt); |
Line 3920... | Line 3920... | ||
3920 | default:break; |
3920 | default:break; |
3921 | } |
3921 | } |
3922 | } |
3922 | } |
3923 | reset(); |
3923 | reset(); |
3924 | break; |
3924 | break; |
3925 | 3925 | ||
3926 | case RANGE: |
3926 | case RANGE: |
3927 | /* |
3927 | /* |
3928 | @ range xmin,xmax,ymin,ymax |
3928 | @ range xmin,xmax,ymin,ymax |
3929 | @ if not given: 0,xsize,0,ysize (eg in pixels) |
3929 | @ if not given: 0,xsize,0,ysize (eg in pixels) |
3930 | */ |
3930 | */ |
Line 4067... | Line 4067... | ||
4067 | decimals = find_number_of_digits(precision); |
4067 | decimals = find_number_of_digits(precision); |
4068 | for(c = 0 ; c < i-1 ; c = c+4){ |
4068 | for(c = 0 ; c < i-1 ; c = c+4){ |
4069 | string_length = 1 + snprintf(NULL,0,"dragstuff.addShape(new Shape(%d,%d,%d,%d,5,[%.*f,%.*f,%.*f,%.*f],[%.*f,%.*f,%.*f,%.*f],[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%s,%s,%d));\n",drag_type,object_cnt,onclick,use_snap,decimals,double_data[c],decimals,double_data[c+2],decimals,double_data[c+2],decimals,double_data[c],decimals,double_data[c+1],decimals,double_data[c+1],decimals,double_data[c+3],decimals,double_data[c+3],line_width,line_width,line_width,stroke_color,stroke_opacity,stroke_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,my_sliders,rotation_center,use_offset); |
4069 | string_length = 1 + snprintf(NULL,0,"dragstuff.addShape(new Shape(%d,%d,%d,%d,5,[%.*f,%.*f,%.*f,%.*f],[%.*f,%.*f,%.*f,%.*f],[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%s,%s,%d));\n",drag_type,object_cnt,onclick,use_snap,decimals,double_data[c],decimals,double_data[c+2],decimals,double_data[c+2],decimals,double_data[c],decimals,double_data[c+1],decimals,double_data[c+1],decimals,double_data[c+3],decimals,double_data[c+3],line_width,line_width,line_width,stroke_color,stroke_opacity,stroke_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,my_sliders,rotation_center,use_offset); |
4070 | check_string_length(string_length);tmp_buffer = my_newmem(string_length); |
4070 | check_string_length(string_length);tmp_buffer = my_newmem(string_length); |
4071 | snprintf(tmp_buffer,string_length,"dragstuff.addShape(new Shape(%d,%d,%d,%d,5,[%.*f,%.*f,%.*f,%.*f],[%.*f,%.*f,%.*f,%.*f],[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%s,%s,%d));\n",drag_type,object_cnt,onclick,use_snap,decimals,double_data[c],decimals,double_data[c+2],decimals,double_data[c+2],decimals,double_data[c],decimals,double_data[c+1],decimals,double_data[c+1],decimals,double_data[c+3],decimals,double_data[c+3],line_width,line_width,line_width,stroke_color,stroke_opacity,stroke_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,my_sliders,rotation_center,use_offset); |
4071 | snprintf(tmp_buffer,string_length,"dragstuff.addShape(new Shape(%d,%d,%d,%d,5,[%.*f,%.*f,%.*f,%.*f],[%.*f,%.*f,%.*f,%.*f],[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%s,%s,%d));\n",drag_type,object_cnt,onclick,use_snap,decimals,double_data[c],decimals,double_data[c+2],decimals,double_data[c+2],decimals,double_data[c],decimals,double_data[c+1],decimals,double_data[c+1],decimals,double_data[c+3],decimals,double_data[c+3],line_width,line_width,line_width,stroke_color,stroke_opacity,stroke_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,my_sliders,rotation_center,use_offset); |
4072 | add_to_buffer(tmp_buffer); |
4072 | add_to_buffer(tmp_buffer); |
4073 | if(onclick != 0){object_cnt++;} |
4073 | if(onclick != 0){object_cnt++;} |
4074 | /* object_cnt++; */ |
4074 | /* object_cnt++; */ |
4075 | } |
4075 | } |
4076 | dragstuff[5] = 1; |
4076 | dragstuff[5] = 1; |
4077 | if(use_dragstuff == 0 ){ use_dragstuff = 1; } |
4077 | if(use_dragstuff == 0 ){ use_dragstuff = 1; } |
Line 4209... | Line 4209... | ||
4209 | add_to_buffer(tmp_buffer); |
4209 | add_to_buffer(tmp_buffer); |
4210 | reply_precision = precision; |
4210 | reply_precision = precision; |
4211 | /* no reply from ruler if non-interactive */ |
4211 | /* no reply from ruler if non-interactive */ |
4212 | if( reply_format == 0 && int_data[0] == -1 ){reply_format = 31;} |
4212 | if( reply_format == 0 && int_data[0] == -1 ){reply_format = 31;} |
4213 | break; |
4213 | break; |
4214 | default: break; |
4214 | default: break; |
4215 | } |
4215 | } |
4216 | } |
4216 | } |
4217 | break; |
4217 | break; |
4218 | 4218 | ||
4219 | case RESETOFFSET: |
4219 | case RESETOFFSET: |
4220 | /* |
4220 | /* |
4221 | @ resetoffset |
4221 | @ resetoffset |
4222 | @ keyword ; use to restore text placement on the canvas to the real (x;y) coordinates of the left bottom corner of the text |
4222 | @ keyword ; use to restore text placement on the canvas to the real (x;y) coordinates of the left bottom corner of the text |
4223 | @ may be active for commands <a href="#text">text</a> and <a href="#string">string</a> (e.g. objects in the drag/drop/onclick-librariy |
4223 | @ may be active for commands <a href="#text">text</a> and <a href="#string">string</a> (e.g. objects in the drag/drop/onclick-librariy |
Line 4260... | Line 4260... | ||
4260 | check_string_length(string_length); |
4260 | check_string_length(string_length); |
4261 | rotation_center = my_newmem(string_length); |
4261 | rotation_center = my_newmem(string_length); |
4262 | snprintf(rotation_center,string_length,"[%f,%f]",rotationcenter[0],rotationcenter[1]); |
4262 | snprintf(rotation_center,string_length,"[%f,%f]",rotationcenter[0],rotationcenter[1]); |
4263 | } |
4263 | } |
4264 | break; |
4264 | break; |
4265 | 4265 | ||
4266 | case SIZE: |
4266 | case SIZE: |
4267 | /* |
4267 | /* |
4268 | @ size width,height |
4268 | @ size width,height |
4269 | @ set canvas size in pixels |
4269 | @ set canvas size in pixels |
4270 | @ mandatory first command (can only be preceded by keyword <a href="#popup">popup</a>) |
4270 | @ mandatory first command (can only be preceded by keyword <a href="#popup">popup</a>) |
Line 4287... | Line 4287... | ||
4287 | if( typeof(wims_status) === 'undefined' ){ var wims_status = \"$status\";};\ |
4287 | if( typeof(wims_status) === 'undefined' ){ var wims_status = \"$status\";};\ |
4288 | if( typeof(use_dragdrop_reply) === 'undefined' ){ var use_dragdrop_reply = false;};\ |
4288 | if( typeof(use_dragdrop_reply) === 'undefined' ){ var use_dragdrop_reply = false;};\ |
4289 | if( typeof(canvas_scripts) === 'undefined' ){ var canvas_scripts = new Array();};\ |
4289 | if( typeof(canvas_scripts) === 'undefined' ){ var canvas_scripts = new Array();};\ |
4290 | canvas_scripts.push(\"%d\");\n/*]]>*/\n</script>\n\ |
4290 | canvas_scripts.push(\"%d\");\n/*]]>*/\n</script>\n\ |
4291 | ",canvas_root_id); |
4291 | ",canvas_root_id); |
4292 | 4292 | ||
4293 | /* style=\"display:block;position:relative;margin-left:auto;margin-right:auto;margin-bottom:4px;\" */ |
4293 | /* style=\"display:block;position:relative;margin-left:auto;margin-right:auto;margin-bottom:4px;\" */ |
4294 | if( use_tooltip != 2){ |
4294 | if( use_tooltip != 2){ |
4295 | fprintf(stdout,"<!-- canvasdraw div -->\n\ |
4295 | fprintf(stdout,"<!-- canvasdraw div -->\n\ |
4296 | <div tabindex=\"0\" id=\"canvas_div%d\" style=\"position:relative;width:%dpx;height:%dpx;margin-left:auto;margin-right:auto;\" oncontextmenu=\"return false;\"></div>\n\ |
4296 | <div tabindex=\"0\" id=\"canvas_div%d\" style=\"position:relative;width:%dpx;height:%dpx;margin-left:auto;margin-right:auto;\" oncontextmenu=\"return false;\"></div>\n\ |
4297 | <!-- tooltip and input placeholder -->\n\ |
4297 | <!-- tooltip and input placeholder -->\n\ |
Line 4359... | Line 4359... | ||
4359 | var unit_x=\" \";\ |
4359 | var unit_x=\" \";\ |
4360 | var unit_y=\" \";\ |
4360 | var unit_y=\" \";\ |
4361 | var dragdrop_reply = [];\ |
4361 | var dragdrop_reply = [];\ |
4362 | var external_canvas = create_canvas%d(%d,xsize,ysize);",VERSION,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,xsize,ysize,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,EXTERNAL_IMAGE_CANVAS); |
4362 | var external_canvas = create_canvas%d(%d,xsize,ysize);",VERSION,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,xsize,ysize,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,EXTERNAL_IMAGE_CANVAS); |
4363 | /* var xstart,ystart are normally 0 : in case of sgraph they have the 'jump' in the graph */ |
4363 | /* var xstart,ystart are normally 0 : in case of sgraph they have the 'jump' in the graph */ |
4364 | break; |
4364 | break; |
4365 | 4365 | ||
4366 | 4366 | ||
4367 | case SEGMENT: |
4367 | case SEGMENT: |
4368 | /* |
4368 | /* |
4369 | @ segment x1,y1,x2,y2,color |
4369 | @ segment x1,y1,x2,y2,color |
4370 | @ alternative: seg |
4370 | @ alternative: seg |
4371 | @ draw a line segment between points (x1:y1)--(x2:y2) in color ''color`` |
4371 | @ draw a line segment between points (x1:y1)--(x2:y2) in color ''color`` |
4372 | @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> |
4372 | @ may be set <a href="#drag">draggable</a> / <a href="#onclick">onclick</a> |
4373 | @%segment_onclick%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%segment 1,1,-9,3,green |
4373 | @%segment_onclick%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%onclick%segment 1,1,-9,3,green |
4374 | @%segment_drag_y%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag y%segment 1,1,-9,3,green |
4374 | @%segment_drag_y%size 400,400%xrange -10,10%yrange -10,10%linewidth 2%drag y%segment 1,1,-9,3,green |
4375 | */ |
4375 | */ |
4376 | for(i=0;i<5;i++) { |
4376 | for(i=0;i<5;i++) { |
4377 | switch(i){ |
4377 | switch(i){ |
4378 | case 0: double_data[0]= get_real(infile,0);break; /* x1-values */ |
4378 | case 0: double_data[0]= get_real(infile,0);break; /* x1-values */ |
4379 | case 1: double_data[1]= get_real(infile,0);break; /* y1-values */ |
4379 | case 1: double_data[1]= get_real(infile,0);break; /* y1-values */ |
4380 | case 2: double_data[2]= get_real(infile,0);break; /* x2-values */ |
4380 | case 2: double_data[2]= get_real(infile,0);break; /* x2-values */ |
Line 4432... | Line 4432... | ||
4432 | check_string_length(string_length);tmp_buffer = my_newmem(string_length); |
4432 | check_string_length(string_length);tmp_buffer = my_newmem(string_length); |
4433 | snprintf(tmp_buffer,string_length,"dragstuff.addShape(new Shape(%d,%d,%d,%d,4,[%.*f,%.*f],[%.*f,%.*f],[30,30],[30,30],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%s,%s,%d));\n",drag_type,object_cnt,onclick,use_snap,decimals,double_data[c],decimals,double_data[c+2],decimals,double_data[c+1],decimals,double_data[c+3],line_width,stroke_color,stroke_opacity,stroke_color,stroke_opacity,0,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,my_sliders,rotation_center,use_offset); |
4433 | snprintf(tmp_buffer,string_length,"dragstuff.addShape(new Shape(%d,%d,%d,%d,4,[%.*f,%.*f],[%.*f,%.*f],[30,30],[30,30],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%s,%s,%d));\n",drag_type,object_cnt,onclick,use_snap,decimals,double_data[c],decimals,double_data[c+2],decimals,double_data[c+1],decimals,double_data[c+3],line_width,stroke_color,stroke_opacity,stroke_color,stroke_opacity,0,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,my_sliders,rotation_center,use_offset); |
4434 | add_to_buffer(tmp_buffer); |
4434 | add_to_buffer(tmp_buffer); |
4435 | if(onclick != 0){object_cnt++;} |
4435 | if(onclick != 0){object_cnt++;} |
4436 | /* object_cnt++;*/ |
4436 | /* object_cnt++;*/ |
4437 | } |
4437 | } |
4438 | reset(); |
4438 | reset(); |
4439 | dragstuff[4] = 1; |
4439 | dragstuff[4] = 1; |
4440 | if(use_dragstuff == 0 ){ use_dragstuff = 1; } |
4440 | if(use_dragstuff == 0 ){ use_dragstuff = 1; } |
4441 | break; |
4441 | break; |
4442 | 4442 | ||
4443 | case SETLIMITS: |
4443 | case SETLIMITS: |
Line 4461... | Line 4461... | ||
4461 | @ setpixel x,y,color |
4461 | @ setpixel x,y,color |
4462 | @ A rectangular "point" with diameter 1 pixel centered at (x:y) in xrange / yrange |
4462 | @ A rectangular "point" with diameter 1 pixel centered at (x:y) in xrange / yrange |
4463 | @ pixels can <b>not</b> be dragged or clicked |
4463 | @ pixels can <b>not</b> be dragged or clicked |
4464 | @ "pixelsize = 1" may be changed by command <code>pixelsize int</code> |
4464 | @ "pixelsize = 1" may be changed by command <code>pixelsize int</code> |
4465 | @%setpixel%size 400,400%xrange -10,10%yrange -10,10%setpixel 1,1,red%pixelsize 2%setpixel 2,2,green%pixelsize 3%setpixel 3,3,blue% |
4465 | @%setpixel%size 400,400%xrange -10,10%yrange -10,10%setpixel 1,1,red%pixelsize 2%setpixel 2,2,green%pixelsize 3%setpixel 3,3,blue% |
4466 | */ |
4466 | */ |
4467 | js_function[DRAW_PIXELS] = 1; |
4467 | js_function[DRAW_PIXELS] = 1; |
4468 | for(i=0;i<3;i++){ |
4468 | for(i=0;i<3;i++){ |
4469 | switch(i){ |
4469 | switch(i){ |
4470 | case 0: double_data[0] = get_real(infile,0); break; /* x */ |
4470 | case 0: double_data[0] = get_real(infile,0); break; /* x */ |
4471 | case 1: double_data[1] = get_real(infile,0); break; /* y */ |
4471 | case 1: double_data[1] = get_real(infile,0); break; /* y */ |
Line 4507... | Line 4507... | ||
4507 | @%slider_click%%size 300,300%xrange -6,6%yrange -6,6%grid 1,1,grey%linewidth 2%slider 0,2*pi,300,28,angle degree, name%fillcolor lightgreen%#CLICK ON THE OBJECTS TO ACTIVATE%opacity 255,30%ftriangle 2,2,-2,2,0,0,red%ftriangle -2,2,-2,-2,0,0,blue%ftriangle -2,-2,2,-2,0,0,green%ftriangle 2,-2,2,2,0,0,orange%rotationcenter 0,0%frect -2,2,2,-2,black |
4507 | @%slider_click%%size 300,300%xrange -6,6%yrange -6,6%grid 1,1,grey%linewidth 2%slider 0,2*pi,300,28,angle degree, name%fillcolor lightgreen%#CLICK ON THE OBJECTS TO ACTIVATE%opacity 255,30%ftriangle 2,2,-2,2,0,0,red%ftriangle -2,2,-2,-2,0,0,blue%ftriangle -2,-2,2,-2,0,0,green%ftriangle 2,-2,2,2,0,0,orange%rotationcenter 0,0%frect -2,2,2,-2,black |
4508 | @%slider_active%%size 300,300%xrange -6,6%yrange -6,6%grid 1,1,grey%linewidth 1%slider 0,2*pi,300,28,angle degree active, name%fillcolor lightgreen%opacity 255,30%ftriangle 2,2,-2,2,0,0,red%ftriangle -2,2,-2,-2,0,0,blue%ftriangle -2,-2,2,-2,0,0,green%ftriangle 2,-2,2,2,0,0,orange%rotationcenter 0,0%frect -2,2,2,-2,black |
4508 | @%slider_active%%size 300,300%xrange -6,6%yrange -6,6%grid 1,1,grey%linewidth 1%slider 0,2*pi,300,28,angle degree active, name%fillcolor lightgreen%opacity 255,30%ftriangle 2,2,-2,2,0,0,red%ftriangle -2,2,-2,-2,0,0,blue%ftriangle -2,-2,2,-2,0,0,green%ftriangle 2,-2,2,2,0,0,orange%rotationcenter 0,0%frect -2,2,2,-2,black |
4509 | @%slider_animate%%size 300,300%xrange -6,6%yrange -6,6%grid 1,1,grey%linewidth 1%slider 0,2*pi,300,28,angle anim active, name%fillcolor lightgreen%opacity 255,30%ftriangle 2,2,-2,2,0,0,red%ftriangle -2,2,-2,-2,0,0,blue%ftriangle -2,-2,2,-2,0,0,green%ftriangle 2,-2,2,2,0,0,orange%rotationcenter 0,0%frect -2,2,2,-2,black |
4509 | @%slider_animate%%size 300,300%xrange -6,6%yrange -6,6%grid 1,1,grey%linewidth 1%slider 0,2*pi,300,28,angle anim active, name%fillcolor lightgreen%opacity 255,30%ftriangle 2,2,-2,2,0,0,red%ftriangle -2,2,-2,-2,0,0,blue%ftriangle -2,-2,2,-2,0,0,green%ftriangle 2,-2,2,2,0,0,orange%rotationcenter 0,0%frect -2,2,2,-2,black |
4510 | @%slider_html_image%%size 400,400%xrange -6,6%yrange -6,6%bgcolor white%grid 1,1,grey%linewidth 1%slider 0,2*pi,300,28,angle active degree,%centered%html 0,0,<img src="gifs/domains/sciences/flasks.svg" width="100px" height="100px" /> |
4510 | @%slider_html_image%%size 400,400%xrange -6,6%yrange -6,6%bgcolor white%grid 1,1,grey%linewidth 1%slider 0,2*pi,300,28,angle active degree,%centered%html 0,0,<img src="gifs/domains/sciences/flasks.svg" width="100px" height="100px" /> |
4511 | */ |
4511 | */ |
4512 | js_function[INTERACTIVE] = 1; |
4512 | js_function[INTERACTIVE] = 1; |
4513 | int_data[2] = 0; /* --> show_display = 0; */ |
4513 | int_data[2] = 0; /* --> show_display = 0; */ |
4514 | for(i=0; i<6 ; i++){ |
4514 | for(i=0; i<6 ; i++){ |
4515 | switch(i){ |
4515 | switch(i){ |
4516 | case 0: double_data[0] = get_real(infile,0);break; /* start value */ |
4516 | case 0: double_data[0] = get_real(infile,0);break; /* start value */ |
4517 | case 1: double_data[1] = get_real(infile,0);break; /* end value */ |
4517 | case 1: double_data[1] = get_real(infile,0);break; /* end value */ |
Line 4530... | Line 4530... | ||
4530 | if(strstr(temp,"y") != 0){slider_type = "Y";if( strstr(temp,"disp")!= 0){int_data[2] = 2;}} |
4530 | if(strstr(temp,"y") != 0){slider_type = "Y";if( strstr(temp,"disp")!= 0){int_data[2] = 2;}} |
4531 | else |
4531 | else |
4532 | canvas_error("slider can be of type: x,y,angle,fun_x:fun_y"); |
4532 | canvas_error("slider can be of type: x,y,angle,fun_x:fun_y"); |
4533 | break; |
4533 | break; |
4534 | case 5: temp = get_string_argument(infile,1); if( strstr(temp,"\"") != 0 ){ temp = str_replace(temp,"\""," ");} |
4534 | case 5: temp = get_string_argument(infile,1); if( strstr(temp,"\"") != 0 ){ temp = str_replace(temp,"\""," ");} |
4535 | /* slider label : in case of latex/mathmlmath we need to remove the extra " */ |
4535 | /* slider label : in case of latex/mathmlmath we need to remove the extra " */ |
4536 | break; |
4536 | break; |
4537 | } |
4537 | } |
4538 | } |
4538 | } |
4539 | 4539 | ||
4540 | if(use_slider == -1 ){ /* add once */ |
4540 | if(use_slider == -1 ){ /* add once */ |
Line 5492... | Line 5492... | ||
5492 | break; |
5492 | break; |
5493 | 5493 | ||
5494 | case X_AXIS_STRINGS: |
5494 | case X_AXIS_STRINGS: |
5495 | /* |
5495 | /* |
5496 | @ xaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n |
5496 | @ xaxis num1:string1:num2:string2:num3:string3:num4:string4:....num_n:string_n |
5497 | @ alternative: xaxistext |
5497 | @ alternative: xaxistext |
5498 | @ usable for commands <a href="#numberline">numberline</a> and <a href="#grid">grid</a> or combinations thereof |
5498 | @ usable for commands <a href="#numberline">numberline</a> and <a href="#grid">grid</a> or combinations thereof |
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 | @ in case of command ''grid``. there is no need to use keyword <a href="#axisnumbering">axisnumbering</a> |
5500 | @ in case of command ''grid``. there is no need to use keyword <a href="#axisnumbering">axisnumbering</a> |
5501 | @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a> |
5501 | @ use command <a href="#axis">axis</a> to have visual x/y-axis lines (see command <a href="#grid">grid</a> |
5502 | @ 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>) |
5502 | @ 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>) |