Rev 17351 | Rev 17576 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17351 | Rev 17571 | ||
---|---|---|---|
Line 208... | Line 208... | ||
208 | if(event_which == 1){ return; };\ |
208 | if(event_which == 1){ return; };\ |
209 | var xy = multi_snap_check(x,y,points_snap);\ |
209 | var xy = multi_snap_check(x,y,points_snap);\ |
210 | if( num == 0 ){\ |
210 | if( num == 0 ){\ |
211 | points_x[0] = xy[0];\ |
211 | points_x[0] = xy[0];\ |
212 | points_y[0] = xy[1];\ |
212 | points_y[0] = xy[1];\ |
213 | }else{\ |
213 | } else {\ |
214 | points_x.push(xy[0]);\ |
214 | points_x.push(xy[0]);\ |
215 | points_y.push(xy[1]);\ |
215 | points_y.push(xy[1]);\ |
216 | };\ |
216 | };\ |
217 | draw_points();\ |
217 | draw_points();\ |
218 | };\ |
218 | };\ |
Line 237... | Line 237... | ||
237 | if( no_controls != 1){ |
237 | if( no_controls != 1){ |
238 | fprintf(js_include_file,"\ |
238 | fprintf(js_include_file,"\ |
239 | inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
239 | inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
240 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='' id='input_points_x' />:<input type='text' size='5' value='' id='input_points_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_points_x,input_points_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
240 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='' id='input_points_x' />:<input type='text' size='5' value='' id='input_points_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_points_x,input_points_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
241 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
241 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
242 | } |
- | |
243 | else |
242 | } else { |
244 | { |
- | |
245 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
243 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
246 | } |
244 | } |
247 | break; |
245 | break; |
248 | 246 | ||
249 | 247 | ||
Line 256... | Line 254... | ||
256 | var yc = circles_y[last];\ |
254 | var yc = circles_y[last];\ |
257 | if(event_which == 0){\ |
255 | if(event_which == 0){\ |
258 | if( multidraw_object_cnt == 0 ){\ |
256 | if( multidraw_object_cnt == 0 ){\ |
259 | if( num == 0 ){\ |
257 | if( num == 0 ){\ |
260 | circles_x[0]=xy[0];circles_y[0]=xy[1];multi_radius[0]=4;\ |
258 | circles_x[0]=xy[0];circles_y[0]=xy[1];multi_radius[0]=4;\ |
261 | }\ |
- | |
262 | else\ |
259 | } else {\ |
263 | {\ |
- | |
264 | circles_x.push(xy[0]);circles_y.push(xy[1]);multi_radius.push(4);\ |
260 | circles_x.push(xy[0]);circles_y.push(xy[1]);multi_radius.push(4);\ |
265 | };\ |
261 | };\ |
266 | };\ |
262 | };\ |
267 | multidraw_object_cnt++;\ |
263 | multidraw_object_cnt++;\ |
268 | }\ |
- | |
269 | else\ |
264 | } else {\ |
270 | {\ |
- | |
271 | if( multidraw_object_cnt == 1 ){\ |
265 | if( multidraw_object_cnt == 1 ){\ |
272 | multi_radius[last] = parseInt(Math.sqrt( (xy[0] - xc)*(xy[0] - xc) + (xy[1] - yc)*(xy[1] - yc) ));\ |
266 | multi_radius[last] = parseInt(Math.sqrt( (xy[0] - xc)*(xy[0] - xc) + (xy[1] - yc)*(xy[1] - yc) ));\ |
273 | };\ |
267 | };\ |
274 | };\ |
268 | };\ |
275 | if( multidraw_object_cnt == 2 ){\ |
269 | if( multidraw_object_cnt == 2 ){\ |
Line 303... | Line 297... | ||
303 | 297 | ||
304 | if(no_controls != 1 ){ /* for BPR...*/ |
298 | if(no_controls != 1 ){ /* for BPR...*/ |
305 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
299 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
306 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>M:(<input type='text' size='3' value='' id='input_circles_x' /> : <input type='text' size='3' value='' id='input_circles_y'/>) R:<input type='text' size='3' value='' id='input_circles_r'/></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_circles_x,input_circles_y,input_circles_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
300 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>M:(<input type='text' size='3' value='' id='input_circles_x' /> : <input type='text' size='3' value='' id='input_circles_y'/>) R:<input type='text' size='3' value='' id='input_circles_r'/></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_circles_x,input_circles_y,input_circles_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
307 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
301 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
308 | } |
- | |
309 | else |
302 | } else { |
310 | { |
- | |
311 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
303 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
312 | } |
304 | } |
313 | break; |
305 | break; |
314 | /* line/lines */ |
306 | /* line/lines */ |
315 | case 4 ... 5 : |
307 | case 4 ... 5 : |
Line 321... | Line 313... | ||
321 | for(var p = 0 ; p < len ; p = p+2){\ |
313 | for(var p = 0 ; p < len ; p = p+2){\ |
322 | pp = p+1;\ |
314 | pp = p+1;\ |
323 | if(lines_x[p] < lines_x[pp]+marge && lines_x[p] > lines_x[pp]-marge){\ |
315 | if(lines_x[p] < lines_x[pp]+marge && lines_x[p] > lines_x[pp]-marge){\ |
324 | tmp_x[p] = lines_x[p];tmp_x[pp] = lines_x[pp];\ |
316 | tmp_x[p] = lines_x[p];tmp_x[pp] = lines_x[pp];\ |
325 | tmp_y[p] = 0;tmp_y[pp] = ysize;\ |
317 | tmp_y[p] = 0;tmp_y[pp] = ysize;\ |
326 | }\ |
- | |
327 | else\ |
318 | } else {\ |
328 | {\ |
- | |
329 | if(lines_y[p] < lines_y[pp]+marge && lines_y[p] > lines_y[pp]-marge){\ |
319 | if(lines_y[p] < lines_y[pp]+marge && lines_y[p] > lines_y[pp]-marge){\ |
330 | tmp_x[p] = 0;tmp_x[pp] = xsize;\ |
320 | tmp_x[p] = 0;tmp_x[pp] = xsize;\ |
331 | tmp_y[p] = lines_y[p];tmp_y[pp] = lines_y[pp];\ |
321 | tmp_y[p] = lines_y[p];tmp_y[pp] = lines_y[pp];\ |
332 | }\ |
- | |
333 | else\ |
322 | } else {\ |
334 | {\ |
- | |
335 | tmp_x[p] = 0;tmp_x[pp] = xsize;\ |
323 | tmp_x[p] = 0;tmp_x[pp] = xsize;\ |
336 | tmp_y[p] = lines_y[p] - (lines_x[p])*(lines_y[pp] - lines_y[p])/(lines_x[pp] - lines_x[p]);\ |
324 | tmp_y[p] = lines_y[p] - (lines_x[p])*(lines_y[pp] - lines_y[p])/(lines_x[pp] - lines_x[p]);\ |
337 | tmp_y[pp] = lines_y[p] + (xsize - lines_x[p])*(lines_y[pp] - lines_y[p])/(lines_x[pp] - lines_x[p]);\ |
325 | tmp_y[pp] = lines_y[p] + (xsize - lines_x[p])*(lines_y[pp] - lines_y[p])/(lines_x[pp] - lines_x[p]);\ |
338 | };\ |
326 | };\ |
339 | };\ |
327 | };\ |
Line 343... | Line 331... | ||
343 | var xy = multi_snap_check(x,y,lines_snap);\ |
331 | var xy = multi_snap_check(x,y,lines_snap);\ |
344 | if(event_which == 0){\ |
332 | if(event_which == 0){\ |
345 | if( num == 0 && multidraw_object_cnt == 0 ){lines_x = [];lines_y = [];};\ |
333 | if( num == 0 && multidraw_object_cnt == 0 ){lines_x = [];lines_y = [];};\ |
346 | lines_x.push(xy[0]);lines_y.push(xy[1]);\ |
334 | lines_x.push(xy[0]);lines_y.push(xy[1]);\ |
347 | multidraw_object_cnt++;\ |
335 | multidraw_object_cnt++;\ |
348 | }\ |
- | |
349 | else\ |
336 | } else {\ |
350 | {\ |
- | |
351 | if( multidraw_object_cnt == 1 ){\ |
337 | if( multidraw_object_cnt == 1 ){\ |
352 | lines_x.push(xy[0]);lines_y.push(xy[1]);\ |
338 | lines_x.push(xy[0]);lines_y.push(xy[1]);\ |
353 | draw_lines();\ |
339 | draw_lines();\ |
354 | lines_x.pop();lines_y.pop();\ |
340 | lines_x.pop();lines_y.pop();\ |
355 | };\ |
341 | };\ |
Line 383... | Line 369... | ||
383 | 369 | ||
384 | if( no_controls != 1 ){ /* for BPR...*/ |
370 | if( no_controls != 1 ){ /* for BPR...*/ |
385 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
371 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
386 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_lines_x' style='text-align:center;'/>) --- ( <input type='text' size='5' value='x2 : y2' id='input_lines_y' style='text-align:center;' /> )</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_lines_x,input_lines_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
372 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_lines_x' style='text-align:center;'/>) --- ( <input type='text' size='5' value='x2 : y2' id='input_lines_y' style='text-align:center;' /> )</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_lines_x,input_lines_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
387 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
373 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
388 | } |
- | |
389 | else |
374 | } else { |
390 | { |
- | |
391 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
375 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
392 | } |
376 | } |
393 | break; |
377 | break; |
394 | /* segment/segments */ |
378 | /* segment/segments */ |
395 | case 6 ... 7 : |
379 | case 6 ... 7 : |
Line 397... | Line 381... | ||
397 | var xy = multi_snap_check(x,y,segments_snap);\ |
381 | var xy = multi_snap_check(x,y,segments_snap);\ |
398 | if(event_which == 0){\ |
382 | if(event_which == 0){\ |
399 | if( num == 0 && multidraw_object_cnt == 0 ){segments_x = [];segments_y = [];};\ |
383 | if( num == 0 && multidraw_object_cnt == 0 ){segments_x = [];segments_y = [];};\ |
400 | segments_x.push(xy[0]);segments_y.push(xy[1]);\ |
384 | segments_x.push(xy[0]);segments_y.push(xy[1]);\ |
401 | multidraw_object_cnt++;\ |
385 | multidraw_object_cnt++;\ |
402 | }\ |
- | |
403 | else\ |
386 | } else {\ |
404 | {\ |
- | |
405 | if( multidraw_object_cnt == 1 ){\ |
387 | if( multidraw_object_cnt == 1 ){\ |
406 | segments_x.push(xy[0]);segments_y.push(xy[1]);\ |
388 | segments_x.push(xy[0]);segments_y.push(xy[1]);\ |
407 | draw_segments();\ |
389 | draw_segments();\ |
408 | segments_x.pop();segments_y.pop();\ |
390 | segments_x.pop();segments_y.pop();\ |
409 | };\ |
391 | };\ |
Line 438... | Line 420... | ||
438 | 420 | ||
439 | if( no_controls != 1 ){ /* for BPR...*/ |
421 | if( no_controls != 1 ){ /* for BPR...*/ |
440 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
422 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
441 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_segments_x' style='text-align:center;' />) --- ( <input type='text' size='5' value='x2 : y2' id='input_segments_y' style='text-align:center;'/>)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_segments_x,input_segments_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
423 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_segments_x' style='text-align:center;' />) --- ( <input type='text' size='5' value='x2 : y2' id='input_segments_y' style='text-align:center;'/>)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_segments_x,input_segments_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
442 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
424 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
443 | } |
- | |
444 | else |
425 | } else { |
445 | { |
- | |
446 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
426 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
447 | } |
427 | } |
448 | break; |
428 | break; |
449 | /* arrow/arrows */ |
429 | /* arrow/arrows */ |
450 | case 8 ... 9 : |
430 | case 8 ... 9 : |
Line 452... | Line 432... | ||
452 | var xy = multi_snap_check(x,y,arrows_snap);\ |
432 | var xy = multi_snap_check(x,y,arrows_snap);\ |
453 | if(event_which == 0){\ |
433 | if(event_which == 0){\ |
454 | if( num == 0 && multidraw_object_cnt == 0 ){arrows_x = [];arrows_y = [];};\ |
434 | if( num == 0 && multidraw_object_cnt == 0 ){arrows_x = [];arrows_y = [];};\ |
455 | arrows_x.push(xy[0]);arrows_y.push(xy[1]);\ |
435 | arrows_x.push(xy[0]);arrows_y.push(xy[1]);\ |
456 | multidraw_object_cnt++;\ |
436 | multidraw_object_cnt++;\ |
457 | }\ |
- | |
458 | else\ |
437 | } else {\ |
459 | {\ |
- | |
460 | if( multidraw_object_cnt == 1 ){\ |
438 | if( multidraw_object_cnt == 1 ){\ |
461 | arrows_x.push(xy[0]);arrows_y.push(xy[1]);\ |
439 | arrows_x.push(xy[0]);arrows_y.push(xy[1]);\ |
462 | draw_arrows();\ |
440 | draw_arrows();\ |
463 | arrows_x.pop();arrows_y.pop();\ |
441 | arrows_x.pop();arrows_y.pop();\ |
464 | };\ |
442 | };\ |
Line 508... | Line 486... | ||
508 | 486 | ||
509 | if( no_controls != 1 ){ /* for BPR...*/ |
487 | if( no_controls != 1 ){ /* for BPR...*/ |
510 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
488 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
511 | if( multiuserinput[%d] == 1){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_arrows_x' style='text-align:center;' /><b>) --- (</b> <input type='text' size='5' value='x2 : y2' id='input_arrows_y' style=';text-align:center;' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_arrows_x,input_arrows_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
489 | if( multiuserinput[%d] == 1){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_arrows_x' style='text-align:center;' /><b>) --- (</b> <input type='text' size='5' value='x2 : y2' id='input_arrows_y' style=';text-align:center;' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_arrows_x,input_arrows_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
512 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
490 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
513 | } |
- | |
514 | else |
491 | } else { |
515 | { |
- | |
516 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
492 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
517 | } |
493 | } |
518 | break; |
494 | break; |
519 | 495 | ||
520 | /* triangle/triangles */ |
496 | /* triangle/triangles */ |
Line 524... | Line 500... | ||
524 | var last = triangles_x.length - 1;\ |
500 | var last = triangles_x.length - 1;\ |
525 | if(event_which == 0){\ |
501 | if(event_which == 0){\ |
526 | if(num == 0 && multidraw_object_cnt == 0){\ |
502 | if(num == 0 && multidraw_object_cnt == 0){\ |
527 | triangles_x = [];triangles_y = [];\ |
503 | triangles_x = [];triangles_y = [];\ |
528 | triangles_x[0] = xy[0];triangles_y[0] = xy[1];\ |
504 | triangles_x[0] = xy[0];triangles_y[0] = xy[1];\ |
529 | }\ |
- | |
530 | else\ |
505 | } else {\ |
531 | {\ |
- | |
532 | triangles_x.push(xy[0]);triangles_y.push(xy[1]);\ |
506 | triangles_x.push(xy[0]);triangles_y.push(xy[1]);\ |
533 | };\ |
507 | };\ |
534 | multidraw_object_cnt++;\ |
508 | multidraw_object_cnt++;\ |
535 | }\ |
- | |
536 | else\ |
509 | } else {\ |
537 | {\ |
- | |
538 | if( multidraw_object_cnt < 3 ){\ |
510 | if( multidraw_object_cnt < 3 ){\ |
539 | triangles_x.push(xy[0]);triangles_y.push(xy[1]);\ |
511 | triangles_x.push(xy[0]);triangles_y.push(xy[1]);\ |
540 | draw_triangles();\ |
512 | draw_triangles();\ |
541 | triangles_x.pop();triangles_y.pop();\ |
513 | triangles_x.pop();triangles_y.pop();\ |
542 | };\ |
514 | };\ |
543 | };\ |
515 | };\ |
544 | if( multidraw_object_cnt == 3 ){\ |
516 | if( multidraw_object_cnt == 3 ){\ |
545 | triangles_x.pop();triangles_y.pop();\ |
517 | triangles_x.pop();triangles_y.pop();\ |
546 | triangles_x.push(xy[0]);triangles_y.push(xy[1]);\ |
518 | triangles_x.push(xy[0]);triangles_y.push(xy[1]);\ |
547 | multidraw_object_cnt = 0;\ |
519 | multidraw_object_cnt = 0;\ |
Line 576... | Line 548... | ||
576 | 548 | ||
577 | if(no_controls != 1 ){ /* for BPR...*/ |
549 | if(no_controls != 1 ){ /* for BPR...*/ |
578 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
550 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
579 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td><b>(<input type='text' size='5' value='x1 : y1' id='input_triangles_x' />) -- (<input type='text' size='5' value='x2 : y2' id='input_triangles_y' />) -- (<input type='text' size='5' value='x3 : y3' id='input_triangles_r' />)</b></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_triangles_x,input_triangles_y,input_triangles_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
551 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td><b>(<input type='text' size='5' value='x1 : y1' id='input_triangles_x' />) -- (<input type='text' size='5' value='x2 : y2' id='input_triangles_y' />) -- (<input type='text' size='5' value='x3 : y3' id='input_triangles_r' />)</b></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_triangles_x,input_triangles_y,input_triangles_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
580 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
552 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
581 | } |
- | |
582 | else |
553 | } else { |
583 | { |
- | |
584 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
554 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
585 | } |
555 | } |
586 | break; |
556 | break; |
587 | /* closedpoly */ |
557 | /* closedpoly */ |
588 | case 12 : |
558 | case 12 : |
Line 601... | Line 571... | ||
601 | var xy = multi_snap_check(x,y,closedpoly_snap);\ |
571 | var xy = multi_snap_check(x,y,closedpoly_snap);\ |
602 | if(event_which == 0){\ |
572 | if(event_which == 0){\ |
603 | if(multidraw_object_cnt == 0){\ |
573 | if(multidraw_object_cnt == 0){\ |
604 | closedpoly_x = [];closedpoly_y = [];\ |
574 | closedpoly_x = [];closedpoly_y = [];\ |
605 | closedpoly_x[0] = xy[0];closedpoly_y[0] = xy[1];\ |
575 | closedpoly_x[0] = xy[0];closedpoly_y[0] = xy[1];\ |
606 | }\ |
- | |
607 | else\ |
576 | } else {\ |
608 | {\ |
- | |
609 | closedpoly_x.push(xy[0]);closedpoly_y.push(xy[1]);\ |
577 | closedpoly_x.push(xy[0]);closedpoly_y.push(xy[1]);\ |
610 | };\ |
578 | };\ |
611 | multidraw_object_cnt++;\ |
579 | multidraw_object_cnt++;\ |
612 | if( multidraw_object_cnt > 2 ){\ |
580 | if( multidraw_object_cnt > 2 ){\ |
613 | if( check_closed(x,y,closedpoly_x,closedpoly_y) == 1){\ |
581 | if( check_closed(x,y,closedpoly_x,closedpoly_y) == 1){\ |
614 | draw_closedpoly();\ |
582 | draw_closedpoly();\ |
615 | multidraw_object_cnt = 0;\ |
583 | multidraw_object_cnt = 0;\ |
616 | };\ |
584 | };\ |
617 | };\ |
585 | };\ |
618 | }\ |
- | |
619 | else\ |
586 | } else {\ |
620 | {\ |
- | |
621 | if( multidraw_object_cnt > 0 ){\ |
587 | if( multidraw_object_cnt > 0 ){\ |
622 | closedpoly_x.push(xy[0]);closedpoly_y.push(xy[1]);\ |
588 | closedpoly_x.push(xy[0]);closedpoly_y.push(xy[1]);\ |
623 | draw_closedpoly();\ |
589 | draw_closedpoly();\ |
624 | closedpoly_x.pop();closedpoly_y.pop();\ |
590 | closedpoly_x.pop();closedpoly_y.pop();\ |
625 | };\ |
591 | };\ |
626 | };\ |
592 | };\ |
627 | };function draw_closedpoly(){\ |
593 | };function draw_closedpoly(){\ |
628 | var len = closedpoly_x.length;\ |
594 | var len = closedpoly_x.length;\ |
629 | context_closedpoly.clearRect(0,0,xsize,ysize);\ |
595 | context_closedpoly.clearRect(0,0,xsize,ysize);\ |
630 | var p = 0;\ |
596 | var p = 0;\ |
631 | context_closedpoly.beginPath();\ |
597 | context_closedpoly.beginPath();\ |
Line 654... | Line 620... | ||
654 | 620 | ||
655 | if( no_controls != 1 ){ /* for BPR...*/ |
621 | if( no_controls != 1 ){ /* for BPR...*/ |
656 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
622 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
657 | if( multiuserinput[%d] == 1){inner_html+=\"<td>(<input type='text' size='5' value='x1:x2:x3:...' id='input_closedpoly_x' style='text-align:center;' /><b>) --- (</b> <input type='text' size='5' value='y1:y2:y3:...' id='input_closedpoly_y' style='text-align:center;'/>)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_closedpoly_x,input_closedpoly_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
623 | if( multiuserinput[%d] == 1){inner_html+=\"<td>(<input type='text' size='5' value='x1:x2:x3:...' id='input_closedpoly_x' style='text-align:center;' /><b>) --- (</b> <input type='text' size='5' value='y1:y2:y3:...' id='input_closedpoly_y' style='text-align:center;'/>)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_closedpoly_x,input_closedpoly_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
658 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
624 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
659 | } |
- | |
660 | else |
625 | } else { |
661 | { |
- | |
662 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
626 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
663 | } |
627 | } |
664 | break; |
628 | break; |
665 | /* text : always uses user input field !! */ |
629 | /* text : always uses user input field !! */ |
666 | case 13: |
630 | case 13: |
Line 668... | Line 632... | ||
668 | if(event_which == 1){ return; };\ |
632 | if(event_which == 1){ return; };\ |
669 | var xy = multi_snap_check(x,y,text_snap);\ |
633 | var xy = multi_snap_check(x,y,text_snap);\ |
670 | if( num == 0 ){\ |
634 | if( num == 0 ){\ |
671 | text_x[0] = xy[0];\ |
635 | text_x[0] = xy[0];\ |
672 | text_y[0] =xy[1];\ |
636 | text_y[0] =xy[1];\ |
673 | }else{\ |
637 | } else {\ |
674 | text_x.push(xy[0]);\ |
638 | text_x.push(xy[0]);\ |
675 | text_y.push(xy[1]);\ |
639 | text_y.push(xy[1]);\ |
676 | };\ |
640 | };\ |
677 | draw_text();\ |
641 | draw_text();\ |
678 | };function conv_to_unicode(str){\ |
642 | };function conv_to_unicode(str){\ |
Line 698... | Line 662... | ||
698 | var text_snap = multisnaptogrid[%d];\ |
662 | var text_snap = multisnaptogrid[%d];\ |
699 | var text_x = new Array();var text_y = new Array(); var text_abc = new Array();",canvas_root_id,u,i,i); |
663 | var text_x = new Array();var text_y = new Array(); var text_abc = new Array();",canvas_root_id,u,i,i); |
700 | 664 | ||
701 | if( no_controls != 1 ){ /* for BPR...*/ |
665 | if( no_controls != 1 ){ /* for BPR...*/ |
702 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt=0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td><td><input type='text' size='6' value='' id='input_text_r' />\";if( multiuserinput[%d] == 1){inner_html+=\"(<input type='text' size='2' value='x' id='input_text_x' style='text-align:center;' />:<input type='text' size='2' value='y' id='input_text_y' style='text-align:center;'/>)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_text_x,input_text_y,input_text_r);' value='OK' /></td>\";}else{inner_html+=\"</td>\";};",u,i,canvas_root_id,u,i,canvas_root_id,u); |
666 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt=0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td><td><input type='text' size='6' value='' id='input_text_r' />\";if( multiuserinput[%d] == 1){inner_html+=\"(<input type='text' size='2' value='x' id='input_text_x' style='text-align:center;' />:<input type='text' size='2' value='y' id='input_text_y' style='text-align:center;'/>)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_text_x,input_text_y,input_text_r);' value='OK' /></td>\";}else{inner_html+=\"</td>\";};",u,i,canvas_root_id,u,i,canvas_root_id,u); |
703 | } |
- | |
704 | else |
667 | } else { |
705 | { |
- | |
706 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
668 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
707 | } |
669 | } |
708 | fprintf(js_include_file,"inner_html+=\"</tr>\";"); |
670 | fprintf(js_include_file,"inner_html+=\"</tr>\";"); |
709 | break; |
671 | break; |
710 | /* rect/rects */ |
672 | /* rect/rects */ |
Line 713... | Line 675... | ||
713 | var xy = multi_snap_check(x,y,rects_snap);\ |
675 | var xy = multi_snap_check(x,y,rects_snap);\ |
714 | if(event_which == 0){\ |
676 | if(event_which == 0){\ |
715 | if( num == 0 && multidraw_object_cnt == 0 ){rects_x = [];rects_y = [];};\ |
677 | if( num == 0 && multidraw_object_cnt == 0 ){rects_x = [];rects_y = [];};\ |
716 | rects_x.push(xy[0]);rects_y.push(xy[1]);\ |
678 | rects_x.push(xy[0]);rects_y.push(xy[1]);\ |
717 | multidraw_object_cnt++;\ |
679 | multidraw_object_cnt++;\ |
718 | }\ |
- | |
719 | else\ |
680 | } else {\ |
720 | {\ |
- | |
721 | if( multidraw_object_cnt == 1 ){\ |
681 | if( multidraw_object_cnt == 1 ){\ |
722 | rects_x.push(xy[0]);rects_y.push(xy[1]);\ |
682 | rects_x.push(xy[0]);rects_y.push(xy[1]);\ |
723 | draw_rects();\ |
683 | draw_rects();\ |
724 | rects_x.pop();rects_y.pop();\ |
684 | rects_x.pop();rects_y.pop();\ |
725 | };\ |
685 | };\ |
726 | };\ |
686 | };\ |
727 | if( multidraw_object_cnt == 2 ){\ |
687 | if( multidraw_object_cnt == 2 ){\ |
728 | multidraw_object_cnt = 0;\ |
688 | multidraw_object_cnt = 0;\ |
729 | draw_rects();\ |
689 | draw_rects();\ |
730 | };\ |
690 | };\ |
731 | };function draw_rects(){\ |
691 | };function draw_rects(){\ |
732 | var len = rects_x.length;\ |
692 | var len = rects_x.length;\ |
733 | if( len %%2 == 0 ){\ |
693 | if( len %%2 == 0 ){\ |
Line 754... | Line 714... | ||
754 | 714 | ||
755 | if( no_controls != 1 ){ |
715 | if( no_controls != 1 ){ |
756 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
716 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
757 | if( multiuserinput[%d] == 1){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_rects_x' style='text-align:center;' />) --- (<input type='text' size='5' value='x2 : y2' id='input_rects_y' style='text-align:center;' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_rects_x,input_rects_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
717 | if( multiuserinput[%d] == 1){inner_html+=\"<td>(<input type='text' size='5' value='x1 : y1' id='input_rects_x' style='text-align:center;' />) --- (<input type='text' size='5' value='x2 : y2' id='input_rects_y' style='text-align:center;' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_rects_x,input_rects_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
758 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
718 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
759 | } |
- | |
760 | else |
719 | } else { |
761 | { |
- | |
762 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
720 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
763 | } |
721 | } |
764 | break; |
722 | break; |
765 | /* poly/polys */ |
723 | /* poly/polys */ |
766 | case 16 ... 17 : |
724 | case 16 ... 17 : |
Line 769... | Line 727... | ||
769 | var xy = multi_snap_check(x,y,polys_snap);\ |
727 | var xy = multi_snap_check(x,y,polys_snap);\ |
770 | if(event_which == 0){\ |
728 | if(event_which == 0){\ |
771 | if(num == 0 && multidraw_object_cnt == 0){\ |
729 | if(num == 0 && multidraw_object_cnt == 0){\ |
772 | polys_x = [];polys_y = [];\ |
730 | polys_x = [];polys_y = [];\ |
773 | polys_x[0] = xy[0];polys_y[0] = xy[1];\ |
731 | polys_x[0] = xy[0];polys_y[0] = xy[1];\ |
774 | }\ |
- | |
775 | else\ |
732 | } else {\ |
776 | {\ |
- | |
777 | polys_x.push(xy[0]);polys_y.push(xy[1]);\ |
733 | polys_x.push(xy[0]);polys_y.push(xy[1]);\ |
778 | };\ |
734 | };\ |
779 | multidraw_object_cnt++;\ |
735 | multidraw_object_cnt++;\ |
780 | }\ |
- | |
781 | else\ |
736 | } else {\ |
782 | {\ |
- | |
783 | if( multidraw_object_cnt < polynum ){\ |
737 | if( multidraw_object_cnt < polynum ){\ |
784 | polys_x.push(xy[0]);polys_y.push(xy[1]);\ |
738 | polys_x.push(xy[0]);polys_y.push(xy[1]);\ |
785 | draw_polys();\ |
739 | draw_polys();\ |
786 | polys_x.pop();polys_y.pop();\ |
740 | polys_x.pop();polys_y.pop();\ |
787 | };\ |
741 | };\ |
Line 822... | Line 776... | ||
822 | 776 | ||
823 | if( no_controls != 1 ){ |
777 | if( no_controls != 1 ){ |
824 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
778 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
825 | if(multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='8' value='x1,x2...x_n' id='input_polys_x' /> ---- <input type='text' size='8' value='y1,y2...y_n' id='input_polys_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_rects_x,input_rects_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
779 | if(multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='8' value='x1,x2...x_n' id='input_polys_x' /> ---- <input type='text' size='8' value='y1,y2...y_n' id='input_polys_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_rects_x,input_rects_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
826 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
780 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
827 | } |
- | |
828 | else |
781 | } else { |
829 | { |
- | |
830 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
782 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
831 | } |
783 | } |
832 | break; |
784 | break; |
833 | /* parallelogram/parallelograms */ |
785 | /* parallelogram/parallelograms */ |
834 | case 18 ... 19: |
786 | case 18 ... 19: |
Line 838... | Line 790... | ||
838 | var xy = multi_snap_check(x,y,parallelogram_snap);\ |
790 | var xy = multi_snap_check(x,y,parallelogram_snap);\ |
839 | if(event_which == 0){\ |
791 | if(event_which == 0){\ |
840 | if(multidraw_object_cnt == 0){\ |
792 | if(multidraw_object_cnt == 0){\ |
841 | if(num == 0){parallelogram_x = [];parallelogram_y = [];};\ |
793 | if(num == 0){parallelogram_x = [];parallelogram_y = [];};\ |
842 | parallelogram_x.push(xy[0]);parallelogram_y.push(xy[1]);\ |
794 | parallelogram_x.push(xy[0]);parallelogram_y.push(xy[1]);\ |
843 | }\ |
- | |
844 | else\ |
795 | } else {\ |
845 | {\ |
- | |
846 | parallelogram_x.push(xy[0]);parallelogram_y.push(xy[1]);\ |
796 | parallelogram_x.push(xy[0]);parallelogram_y.push(xy[1]);\ |
847 | if(multidraw_object_cnt == 2){\ |
797 | if(multidraw_object_cnt == 2){\ |
848 | var xy = multi_snap_check(parallelogram_x[l2] - parallelogram_x[l1] + parallelogram_x[l0],parallelogram_y[l2] - parallelogram_y[l1] + parallelogram_y[l0],parallelogram_snap);\ |
798 | var xy = multi_snap_check(parallelogram_x[l2] - parallelogram_x[l1] + parallelogram_x[l0],parallelogram_y[l2] - parallelogram_y[l1] + parallelogram_y[l0],parallelogram_snap);\ |
849 | parallelogram_x.push(xy[0]);\ |
799 | parallelogram_x.push(xy[0]);\ |
850 | parallelogram_y.push(xy[1]);\ |
800 | parallelogram_y.push(xy[1]);\ |
851 | };\ |
801 | };\ |
852 | };\ |
802 | };\ |
853 | multidraw_object_cnt++;\ |
803 | multidraw_object_cnt++;\ |
854 | }\ |
- | |
855 | else\ |
804 | } else {\ |
856 | {\ |
- | |
857 | if(multidraw_object_cnt == 1){\ |
805 | if(multidraw_object_cnt == 1){\ |
858 | var xxyy = multi_snap_check(parallelogram_x[l1],parallelogram_y[l1],parallelogram_snap);\ |
806 | var xxyy = multi_snap_check(parallelogram_x[l1],parallelogram_y[l1],parallelogram_snap);\ |
859 | parallelogram_x.push(xxyy[0]);\ |
807 | parallelogram_x.push(xxyy[0]);\ |
860 | parallelogram_y.push(xxyy[1]);\ |
808 | parallelogram_y.push(xxyy[1]);\ |
861 | parallelogram_x.push(xy[0]);\ |
809 | parallelogram_x.push(xy[0]);\ |
862 | parallelogram_y.push(xy[1]);\ |
810 | parallelogram_y.push(xy[1]);\ |
863 | draw_parallelogram();\ |
811 | draw_parallelogram();\ |
864 | parallelogram_x.pop();parallelogram_y.pop();\ |
812 | parallelogram_x.pop();parallelogram_y.pop();\ |
865 | parallelogram_x.pop();parallelogram_y.pop();\ |
813 | parallelogram_x.pop();parallelogram_y.pop();\ |
866 | }\ |
- | |
867 | else\ |
814 | } else {\ |
868 | {\ |
- | |
869 | if(multidraw_object_cnt == 2){\ |
815 | if(multidraw_object_cnt == 2){\ |
870 | var xxyy = multi_snap_check(parallelogram_x[l2]-parallelogram_x[l1] + parallelogram_x[l0],parallelogram_y[l2]-parallelogram_y[l1] + parallelogram_y[l0],parallelogram_snap);\ |
816 | var xxyy = multi_snap_check(parallelogram_x[l2]-parallelogram_x[l1] + parallelogram_x[l0],parallelogram_y[l2]-parallelogram_y[l1] + parallelogram_y[l0],parallelogram_snap);\ |
871 | parallelogram_x.push(xy[0]);parallelogram_y.push(xy[1]);\ |
817 | parallelogram_x.push(xy[0]);parallelogram_y.push(xy[1]);\ |
872 | parallelogram_x.push(xxyy[0]);\ |
818 | parallelogram_x.push(xxyy[0]);\ |
873 | parallelogram_y.push(xxyy[1]);\ |
819 | parallelogram_y.push(xxyy[1]);\ |
Line 916... | Line 862... | ||
916 | 862 | ||
917 | if( no_controls != 1 ){ |
863 | if( no_controls != 1 ){ |
918 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt=0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
864 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt=0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
919 | if(multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='8' value='x1,x2...x_n' id='input_parallelogram_x' /> --- <input type='text' size='8' value='y1,y2...y_n' id='input_parallelogram_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_parallelogram_x,input_parallelogram_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
865 | if(multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='8' value='x1,x2...x_n' id='input_parallelogram_x' /> --- <input type='text' size='8' value='y1,y2...y_n' id='input_parallelogram_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_parallelogram_x,input_parallelogram_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
920 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
866 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
921 | } |
- | |
922 | else |
867 | } else { |
923 | { |
- | |
924 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
868 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
925 | } |
869 | } |
926 | break; |
870 | break; |
927 | /* |
871 | /* |
928 | images : identical ! to userdraw images,bogus_color |
872 | images : identical ! to userdraw images,bogus_color |
Line 944... | Line 888... | ||
944 | case 2: return [parseInt(x+0.5*h),y];break;\ |
888 | case 2: return [parseInt(x+0.5*h),y];break;\ |
945 | case 3: return [parseInt(x+0.5*h),parseInt(y-0.5*h)];break;\ |
889 | case 3: return [parseInt(x+0.5*h),parseInt(y-0.5*h)];break;\ |
946 | case 4: return [parseInt(x-0.5*w),parseInt(y-0.5*h)];break;\ |
890 | case 4: return [parseInt(x-0.5*w),parseInt(y-0.5*h)];break;\ |
947 | default: return [x,y];break;\ |
891 | default: return [x,y];break;\ |
948 | };\ |
892 | };\ |
- | 893 | };\ |
|
- | 894 | const reset_placeable_selection = function(thing){\ |
|
- | 895 | const placeables = document.querySelectorAll('.canvas_placeable');\ |
|
- | 896 | placeables.forEach((placeable) => {\ |
|
- | 897 | placeable.classList.remove('selected');\ |
|
- | 898 | });\ |
|
- | 899 | if(thing){thing.classList.add('selected');}\ |
|
949 | };\ |
900 | };\ |
950 | place_image_on_canvas = function(id){\ |
901 | place_image_on_canvas = function(id){\ |
951 | var thing = document.getElementById(id);\ |
902 | var thing = document.getElementById(id);\ |
- | 903 | reset_placeable_selection(thing);\ |
|
952 | var tag = thing.tagName;\ |
904 | var tag = thing.tagName;\ |
953 | if(tag == 'SVG'){draw_mathml_svg(thing,id);return;};\ |
905 | if(tag == 'SVG'){draw_mathml_svg(thing,id);return;};\ |
954 | if(tag == 'DIV' || tag == 'SPAN' || tag == 'P' || tag == 'TD' || tag == 'TH'){draw_mathml_div(thing,id);return;};\ |
906 | if(tag == 'DIV' || tag == 'SPAN' || tag == 'P' || tag == 'TD' || tag == 'TH'){draw_mathml_div(thing,id);return;};\ |
955 | var src = thing.src;\ |
907 | var src = thing.src;\ |
956 | var image = new Image();\ |
908 | var image = new Image();\ |
957 | image.src = src;\ |
909 | image.src = src;\ |
958 | image.id = 'placed_'+id;\ |
910 | image.id = 'placed_'+id;\ |
959 | image.width = thing.width;\ |
911 | image.width = thing.width;\ |
960 | image.height = thing.height;\ |
912 | image.height = thing.height;\ |
961 | image.onload = function(){ current_id = id; };\ |
913 | image.onload = function(){ current_id = id; };\ |
962 | return;\ |
914 | return;\ |
963 | };\ |
915 | };\ |
964 | function draw_mathml_div(thing,id){\ |
916 | function draw_mathml_div(thing,id){\ |
965 | var fix_div = document.createElement('DIV');\ |
917 | var fix_div = document.createElement('DIV');\ |
966 | var new_id='placed_'+external_div_cnt+'_'+id;\ |
918 | var new_id='placed_'+external_div_cnt+'_'+id;\ |
Line 997... | Line 949... | ||
997 | if(num == 1 && current_id){\ |
949 | if(num == 1 && current_id){\ |
998 | var xy = multi_snap_check(x,y,images_snap);\ |
950 | var xy = multi_snap_check(x,y,images_snap);\ |
999 | images_x.push(xy[0]);\ |
951 | images_x.push(xy[0]);\ |
1000 | images_y.push(xy[1]);\ |
952 | images_y.push(xy[1]);\ |
1001 | images_id.push(current_id);\ |
953 | images_id.push(current_id);\ |
- | 954 | reset_placeable_selection();\ |
|
1002 | current_id = null;\ |
955 | current_id = null;\ |
1003 | };\ |
956 | };\ |
1004 | draw_images();\ |
957 | draw_images();\ |
1005 | };\ |
958 | };\ |
1006 | function draw_images(){\ |
959 | function draw_images(){\ |
Line 1009... | Line 962... | ||
1009 | for(var p = 0 ; p < images_x.length; p++){\ |
962 | for(var p = 0 ; p < images_x.length; p++){\ |
1010 | if( images_id[p] ){\ |
963 | if( images_id[p] ){\ |
1011 | img = document.getElementById(images_id[p]);\ |
964 | img = document.getElementById(images_id[p]);\ |
1012 | tag = img.tagName;\ |
965 | tag = img.tagName;\ |
1013 | xy = image_adjust(img,images_x[p],images_y[p]);\ |
966 | xy = image_adjust(img,images_x[p],images_y[p]);\ |
- | 967 | xy[0] = xy[0] / xsize * 100;\ |
|
- | 968 | xy[1] = xy[1] / ysize * 100;\ |
|
1014 | if( tag != 'IMG' ){\ |
969 | if( tag != 'IMG' ){\ |
1015 | img.setAttribute('style','display:block;position:absolute;top:'+xy[1]+ |
970 | img.setAttribute('style','display:block;position:absolute;top:'+xy[1]+'%%;left:'+xy[0]+'%%;');\ |
1016 | }else{\ |
971 | } else {\ |
1017 | context_images.drawImage(img,xy[0],xy[1],img.width,img.height);\ |
972 | context_images.drawImage(img,xy[0],xy[1],img.width,img.height);\ |
1018 | };\ |
973 | };\ |
1019 | };\ |
974 | };\ |
1020 | };\ |
975 | };\ |
1021 | };\ |
976 | };\ |
Line 1025... | Line 980... | ||
1025 | context_images.font = multifont_family;\ |
980 | context_images.font = multifont_family;\ |
1026 | context_images.fillStyle = \"rgba(\"+multifont_color+\",\"+multistrokeopacity[%d]+\")\";\ |
981 | context_images.fillStyle = \"rgba(\"+multifont_color+\",\"+multistrokeopacity[%d]+\")\";\ |
1027 | var images_snap = multisnaptogrid[%d];\ |
982 | var images_snap = multisnaptogrid[%d];\ |
1028 | var images_x = new Array();var images_y = new Array();\ |
983 | var images_x = new Array();var images_y = new Array();\ |
1029 | var images_id = new Array();",use_offset,canvas_root_id,u,i,i); |
984 | var images_id = new Array();",use_offset,canvas_root_id,u,i,i); |
1030 | if( no_controls != 1 |
985 | if( no_controls != 1 ){ |
1031 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt=0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
986 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt=0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1032 | if( typeof(imagepalette) === 'object' ){\ |
987 | if( typeof(imagepalette) === 'object' ){\ |
1033 | inner_html+=\"<td><table class='%s'><tr>\";\ |
988 | inner_html+=\"<td><table class='%s'><tr>\";\ |
1034 | for(var im=0; im < imagepalette.length; im++){\ |
989 | for(var im=0; im < imagepalette.length; im++){\ |
1035 | if( im %% 4 == 0 ){ inner_html+=\"</tr><tr>\";};\ |
990 | if( im %% 4 == 0 ){ inner_html+=\"</tr><tr>\";};\ |
1036 | inner_html+=\"<td><img onclick='javascript:place_image_on_canvas(this.id);' src='\"+imagepalette[im]+\"' id='imagepalette_\"+im+\"' alt='none'/></td>\";};\ |
991 | inner_html+=\"<td><img onclick='javascript:place_image_on_canvas(this.id);' src='\"+imagepalette[im]+\"' id='imagepalette_\"+im+\"' alt='none'/></td>\";};\ |
1037 | inner_html+=\"</tr></table></td><td> </td></tr>\";}else{inner_html+=\"<td> </td><td> </td></tr>\";};",u,i,canvas_root_id,u,table_css); |
992 | inner_html+=\"</tr></table></td><td> </td></tr>\";}else{inner_html+=\"<td> </td><td> </td></tr>\";};",u,i,canvas_root_id,u,table_css); |
1038 | } |
- | |
1039 | else |
993 | } else { |
1040 | { |
- | |
1041 | fprintf(js_include_file,"inner_html+=\"</table>\";tooltip_div.innerHTML += inner_html;userdraw_primitive = %d;",u); |
994 | fprintf(js_include_file,"inner_html+=\"</table>\";tooltip_div.innerHTML += inner_html;userdraw_primitive = %d;",u); |
1042 | } |
995 | } |
1043 | break; |
996 | break; |
1044 | /* curvedarrow/curvedarrows */ |
997 | /* curvedarrow/curvedarrows */ |
1045 | case 21 ... 22: |
998 | case 21 ... 22: |
Line 1047... | Line 1000... | ||
1047 | var xy = [x,y];\ |
1000 | var xy = [x,y];\ |
1048 | if(event_which == 0){\ |
1001 | if(event_which == 0){\ |
1049 | xy = multi_snap_check(x,y,curvedarrows_snap);\ |
1002 | xy = multi_snap_check(x,y,curvedarrows_snap);\ |
1050 | if(num == 0 && multidraw_object_cnt == 0){curvedarrows_x = [];curvedarrows_y = [];curvedarrows_x[0] = xy[0];curvedarrows_y[0] = xy[1];}\ |
1003 | if(num == 0 && multidraw_object_cnt == 0){curvedarrows_x = [];curvedarrows_y = [];curvedarrows_x[0] = xy[0];curvedarrows_y[0] = xy[1];}\ |
1051 | else{curvedarrows_x.push(xy[0]);curvedarrows_y.push(xy[1]);};multidraw_object_cnt++;\ |
1004 | else{curvedarrows_x.push(xy[0]);curvedarrows_y.push(xy[1]);};multidraw_object_cnt++;\ |
1052 | }\ |
- | |
1053 | else\ |
1005 | } else {\ |
1054 | {\ |
- | |
1055 | if( multidraw_object_cnt < 3 ){curvedarrows_x.push(xy[0]);curvedarrows_y.push(xy[1]);draw_curvedarrows();curvedarrows_x.pop();curvedarrows_y.pop();};\ |
1006 | if( multidraw_object_cnt < 3 ){curvedarrows_x.push(xy[0]);curvedarrows_y.push(xy[1]);draw_curvedarrows();curvedarrows_x.pop();curvedarrows_y.pop();};\ |
1056 | if( multidraw_object_cnt == 3 ){curvedarrows_x.pop();curvedarrows_y.pop();curvedarrows_x.push(xy[0]);curvedarrows_y.push(xy[1]);multidraw_object_cnt = 0;draw_curvedarrows();};\ |
1007 | if( multidraw_object_cnt == 3 ){curvedarrows_x.pop();curvedarrows_y.pop();curvedarrows_x.push(xy[0]);curvedarrows_y.push(xy[1]);multidraw_object_cnt = 0;draw_curvedarrows();};\ |
1057 | };\ |
1008 | };\ |
1058 | };function draw_curvedarrows(){\ |
1009 | };function draw_curvedarrows(){\ |
1059 | var len = curvedarrows_x.length;var x1,y1,x2,y2,x3,y3;\ |
1010 | var len = curvedarrows_x.length;var x1,y1,x2,y2,x3,y3;\ |
Line 1084... | Line 1035... | ||
1084 | context_curvedarrows.setLineDash([2,4]);}else{if(context_curvedarrows.mozDash){\ |
1035 | context_curvedarrows.setLineDash([2,4]);}else{if(context_curvedarrows.mozDash){\ |
1085 | context_curvedarrows.mozDash = [2,4]};};};\ |
1036 | context_curvedarrows.mozDash = [2,4]};};};\ |
1086 | var curvedarrows_x = new Array();var curvedarrows_y = new Array();\ |
1037 | var curvedarrows_x = new Array();var curvedarrows_y = new Array();\ |
1087 | var curvedarrows_snap = multisnaptogrid[%d];", |
1038 | var curvedarrows_snap = multisnaptogrid[%d];", |
1088 | canvas_root_id,u,i,i,i,i,i,i,i,i,i,i,i,i); |
1039 | canvas_root_id,u,i,i,i,i,i,i,i,i,i,i,i,i); |
1089 | 1040 | ||
1090 | if( no_controls != 1 ){ |
1041 | if( no_controls != 1 ){ |
1091 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1042 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1092 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td><b>(<input type='text' size='5' value='x1 : y1' id='input_curvedarrows_x' />) -- (<input type='text' size='5' value='x2 : y2' id='input_curvedarrows_y' />) -- (<input type='text' size='5' value='x3 : y3' id='input_curvedarrows_r' />)</b></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_curvedarrows_x,input_curvedarrows_y,input_curvedarrows_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
1043 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td><b>(<input type='text' size='5' value='x1 : y1' id='input_curvedarrows_x' />) -- (<input type='text' size='5' value='x2 : y2' id='input_curvedarrows_y' />) -- (<input type='text' size='5' value='x3 : y3' id='input_curvedarrows_r' />)</b></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_curvedarrows_x,input_curvedarrows_y,input_curvedarrows_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
1093 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
1044 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
1094 | } |
- | |
1095 | else |
1045 | } else { |
1096 | { |
- | |
1097 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
1046 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
1098 | } |
1047 | } |
1099 | break; |
1048 | break; |
1100 | /* curvedarrow2/curvedarrows2 */ |
1049 | /* curvedarrow2/curvedarrows2 */ |
1101 | case 23 ... 24: |
1050 | case 23 ... 24: |
Line 1103... | Line 1052... | ||
1103 | var xy=[x,y];\ |
1052 | var xy=[x,y];\ |
1104 | if(event_which == 0){\ |
1053 | if(event_which == 0){\ |
1105 | xy = multi_snap_check(x,y,curvedarrows2_snap);\ |
1054 | xy = multi_snap_check(x,y,curvedarrows2_snap);\ |
1106 | if(num == 0 && multidraw_object_cnt == 0){curvedarrows2_x = [];curvedarrows2_y = [];curvedarrows2_x[0] = xy[0];curvedarrows2_y[0] = xy[1];}\ |
1055 | if(num == 0 && multidraw_object_cnt == 0){curvedarrows2_x = [];curvedarrows2_y = [];curvedarrows2_x[0] = xy[0];curvedarrows2_y[0] = xy[1];}\ |
1107 | else{curvedarrows2_x.push(xy[0]);curvedarrows2_y.push(xy[1]);};multidraw_object_cnt++;\ |
1056 | else{curvedarrows2_x.push(xy[0]);curvedarrows2_y.push(xy[1]);};multidraw_object_cnt++;\ |
1108 | }\ |
- | |
1109 | else\ |
1057 | } else {\ |
1110 | {\ |
- | |
1111 | if( multidraw_object_cnt < 3 ){curvedarrows2_x.push(xy[0]);curvedarrows2_y.push(xy[1]);draw_curvedarrows2();curvedarrows2_x.pop();curvedarrows2_y.pop();};\ |
1058 | if( multidraw_object_cnt < 3 ){curvedarrows2_x.push(xy[0]);curvedarrows2_y.push(xy[1]);draw_curvedarrows2();curvedarrows2_x.pop();curvedarrows2_y.pop();};\ |
1112 | if( multidraw_object_cnt == 3 ){curvedarrows2_x.pop();curvedarrows2_y.pop();curvedarrows2_x.push(xy[0]);curvedarrows2_y.push(xy[1]);multidraw_object_cnt = 0;draw_curvedarrows2();};\ |
1059 | if( multidraw_object_cnt == 3 ){curvedarrows2_x.pop();curvedarrows2_y.pop();curvedarrows2_x.push(xy[0]);curvedarrows2_y.push(xy[1]);multidraw_object_cnt = 0;draw_curvedarrows2();};\ |
1113 | };\ |
1060 | };\ |
1114 | };function draw_curvedarrows2(){\ |
1061 | };function draw_curvedarrows2(){\ |
1115 | var len = curvedarrows2_x.length;var x1,y1,x2,y2,x3,y3;\ |
1062 | var len = curvedarrows2_x.length;var x1,y1,x2,y2,x3,y3;\ |
Line 1149... | Line 1096... | ||
1149 | 1096 | ||
1150 | if( no_controls != 1 ){ |
1097 | if( no_controls != 1 ){ |
1151 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1098 | fprintf(js_include_file,"inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1152 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td><b>(<input type='text' size='5' value='x1 : y1' id='input_curvedarrows2_x' />) -- (<input type='text' size='5' value='x2 : y2' id='input_curvedarrows2_y' />) -- (<input type='text' size='5' value='x3 : y3' id='input_curvedarrows2_r' />)</b></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_curvedarrows2_x,input_curvedarrows2_y,input_curvedarrows2_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
1099 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td><b>(<input type='text' size='5' value='x1 : y1' id='input_curvedarrows2_x' />) -- (<input type='text' size='5' value='x2 : y2' id='input_curvedarrows2_y' />) -- (<input type='text' size='5' value='x3 : y3' id='input_curvedarrows2_r' />)</b></td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_curvedarrows2_x,input_curvedarrows2_y,input_curvedarrows2_r);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
1153 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
1100 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
1154 | } |
- | |
1155 | else |
1101 | } else { |
1156 | { |
- | |
1157 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
1102 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
1158 | } |
1103 | } |
1159 | break; |
1104 | break; |
1160 | case 25 ... 26: |
1105 | case 25 ... 26: |
1161 | fprintf(js_include_file,"function crosshairs(x,y,event_which,num){\ |
1106 | fprintf(js_include_file,"function crosshairs(x,y,event_which,num){\ |
1162 | if(event_which == 1){ return; };\ |
1107 | if(event_which == 1){ return; };\ |
1163 | var xy = multi_snap_check(x,y,crosshairs_snap);\ |
1108 | var xy = multi_snap_check(x,y,crosshairs_snap);\ |
1164 | if( num == 0 ){\ |
1109 | if( num == 0 ){\ |
1165 | crosshairs_x[0] = xy[0];\ |
1110 | crosshairs_x[0] = xy[0];\ |
1166 | crosshairs_y[0] = xy[1];\ |
1111 | crosshairs_y[0] = xy[1];\ |
1167 | }else{\ |
1112 | } else {\ |
1168 | crosshairs_x.push(xy[0]);\ |
1113 | crosshairs_x.push(xy[0]);\ |
1169 | crosshairs_y.push(xy[1]);\ |
1114 | crosshairs_y.push(xy[1]);\ |
1170 | };\ |
1115 | };\ |
1171 | draw_crosshairs();\ |
1116 | draw_crosshairs();\ |
1172 | };\ |
1117 | };\ |
Line 1202... | Line 1147... | ||
1202 | if( no_controls != 1){ |
1147 | if( no_controls != 1){ |
1203 | fprintf(js_include_file,"\ |
1148 | fprintf(js_include_file,"\ |
1204 | inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1149 | inner_html+=\"<tr><td><input type='button' onclick='javascript:userdraw_primitive=%d;multidraw_object_cnt = 0;' value='\"+multilabel[%d]+\"' /></td><td><input type='button' onclick='javascript:clear_draw_area%d(%d);' value='delete' /></td>\";\ |
1205 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='' id='input_crosshairs_x' />:<input type='text' size='5' value='' id='input_crosshairs_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_crosshairs_x,input_crosshairs_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
1150 | if( multiuserinput[%d] == 1 ){inner_html+=\"<td>(<input type='text' size='5' value='' id='input_crosshairs_x' />:<input type='text' size='5' value='' id='input_crosshairs_y' />)</td><td><input type='button' id='canvasdraw_ok_button' onclick='javascript:update_draw_area%d(%d,input_crosshairs_x,input_crosshairs_y,null);' value='OK' /></td></tr>\";}else{inner_html+=\"</tr>\";};", |
1206 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
1151 | u,i,canvas_root_id,u,i,canvas_root_id,u); |
1207 | } |
- | |
1208 | else |
1152 | } else { |
1209 | { |
- | |
1210 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
1153 | fprintf(js_include_file,"userdraw_primitive = %d;",u); |
1211 | } |
1154 | } |
1212 | break; |
1155 | break; |
1213 | case 27:break; |
1156 | case 27:break; |
1214 | 1157 |