Subversion Repositories wimsdev

Rev

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

Rev 15309 Rev 15313
Line 10... Line 10...
10
 else\
10
 else\
11
 {\
11
 {\
12
  obj = create_canvas%d(canvas_type,xsize,ysize);\
12
  obj = create_canvas%d(canvas_type,xsize,ysize);\
13
 };\
13
 };\
14
 var ctx = obj.getContext(\"2d\");\
14
 var ctx = obj.getContext(\"2d\");\
15
 ctx.font =\"20px Ariel\";\
15
 ctx.font =\"20px Arial\";\
16
 ctx.textAlign = \"right\";\
16
 ctx.textAlign = \"right\";\
17
 ctx.fillStyle=\"rgba(%s,%f)\";\
17
 ctx.fillStyle=\"rgba(%s,%f)\";\
18
 ctx.fillText(\"+\",xsize,ysize);\
18
 ctx.fillText(\"+\",xsize,ysize);\
19
 ctx.fillText(\"\\u2212\",xsize - 15,ysize-2);\
19
 ctx.fillText(\"\\u2212\",xsize - 15,ysize-2);\
20
 ctx.fillText(\"\\u2192\",xsize - 30,ysize-2);\
20
 ctx.fillText(\"\\u2192\",xsize - 30,ysize-2);\
Line 177... Line 177...
177
   case 4: if(userdraw_radius[0]){ m_data = \" \"+(userdraw_radius[0]).toFixed(prec)+\" rad \";};break;\
177
   case 4: if(userdraw_radius[0]){ m_data = \" \"+(userdraw_radius[0]).toFixed(prec)+\" rad \";};break;\
178
   case 5: if( userdraw_x.length > 0 ){var L = userdraw_x.length;m_data = \" R = \"+((xmax - xmin)*(distance(x,y,userdraw_x[L-1],userdraw_y[L-1]))/xsize).toFixed(prec)+\" \"+unit_x;};break;\
178
   case 5: if( userdraw_x.length > 0 ){var L = userdraw_x.length;m_data = \" R = \"+((xmax - xmin)*(distance(x,y,userdraw_x[L-1],userdraw_y[L-1]))/xsize).toFixed(prec)+\" \"+unit_x;};break;\
179
   default:break;\
179
   default:break;\
180
  };\
180
  };\
181
  var s = parseInt(0.8*%d*(m_data.toString()).length);\
181
  var s = parseInt(0.8*%d*(m_data.toString()).length);\
182
  mouse_context.font = \"%dpx Ariel\";\
182
  mouse_context.font = \"%dpx Arial\";\
183
  mouse_context.fillStyle = \"rgba(%s,%f)\";\
183
  mouse_context.fillStyle = \"rgba(%s,%f)\";\
184
  mouse_context.clearRect(0,0,s,1.2*%d);\
184
  mouse_context.clearRect(0,0,s,1.2*%d);\
185
  mouse_context.fillText(m_data,0,%d);\
185
  mouse_context.fillText(m_data,0,%d);\
186
 };\
186
 };\
187
};",type,MOUSE_CANVAS,canvas_root_id,canvas_root_id,canvas_root_id,precision,canvas_root_id,font_size,font_size,stroke_color,stroke_opacity,font_size,font_size);
187
};",type,MOUSE_CANVAS,canvas_root_id,canvas_root_id,canvas_root_id,precision,canvas_root_id,font_size,font_size,stroke_color,stroke_opacity,font_size,font_size);
Line 215... Line 215...
215
  case 4: string = '\\u2221 = '+(value*(180/Math.PI)).toFixed(slider_prec)+'\\u00B0';break;\
215
  case 4: string = '\\u2221 = '+(value*(180/Math.PI)).toFixed(slider_prec)+'\\u00B0';break;\
216
  case 5: string = 'not implemented';break;\
216
  case 5: string = 'not implemented';break;\
217
  default: string = '['+value+']';break;\
217
  default: string = '['+value+']';break;\
218
 };\
218
 };\
219
 var s = parseInt(1.2*%d*(string).length);\
219
 var s = parseInt(1.2*%d*(string).length);\
220
 current_context.font = '%dpx Ariel';\
220
 current_context.font = '%dpx Arial';\
221
 current_context.strokeStyle = 'rgba(%s,%.2f)';\
221
 current_context.strokeStyle = 'rgba(%s,%.2f)';\
222
 current_context.clearRect(0,0,s,1.2*%d);\
222
 current_context.clearRect(0,0,s,1.2*%d);\
223
 current_context.fillText(string,0,%d);};",precision,canvas_root_id,MOUSE_CANVAS,font_size,font_size,font_color,stroke_opacity,font_size,font_size);
223
 current_context.fillText(string,0,%d);};",precision,canvas_root_id,MOUSE_CANVAS,font_size,font_size,font_color,stroke_opacity,font_size,font_size);
224
}
224
}
225
 
225
 
Line 1543... Line 1543...
1543
    default:protractor_stop(evt);\
1543
    default:protractor_stop(evt);\
1544
   };\
1544
   };\
1545
  };\
1545
  };\
1546
 };\
1546
 };\
1547
 protractor%d();",canvas_root_id);
1547
 protractor%d();",canvas_root_id);
-
 
1548
 
1548
}
1549
}
1549
else
1550
else
1550
{
1551
{
1551
 fprintf(js_include_file,"\
1552
 fprintf(js_include_file,"\
1552
  ctx.save();\
1553
  ctx.save();\