Rev 16643 | Rev 16705 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16643 | Rev 16700 | ||
---|---|---|---|
Line 714... | Line 714... | ||
714 | {\ |
714 | {\ |
715 | setTimeout(function(){ filltoborder( x0,y0,color,color,canvas_type,true,ctx); },500);\ |
715 | setTimeout(function(){ filltoborder( x0,y0,color,color,canvas_type,true,ctx); },500);\ |
716 | };\ |
716 | };\ |
717 | return;\ |
717 | return;\ |
718 | };",canvas_root_id,canvas_root_id); |
718 | };",canvas_root_id,canvas_root_id); |
- | 719 | break; |
|
- | 720 | ||
- | 721 | case DRAW_SUBSUP: |
|
- | 722 | fprintf(js_include_file,"\n/* draw sub sup imitation in canvas */\ |
|
- | 723 | function draw_subsup(ctx,x,y,txt){\ |
|
- | 724 | var C;var c;var len = txt.length;var w = x;var baseline;var space = 0;\ |
|
- | 725 | ctx.save();var subsup=0;\ |
|
- | 726 | ctx.textBaseline = 'middle';\ |
|
- | 727 | for( c = 0 ; c<len ;c++){\ |
|
- | 728 | C = txt.charAt(c);space = 0;\ |
|
- | 729 | if(C == '_'){subsup = 1;c++;space = 3;baseline='top';C = txt.charAt(c);};\ |
|
- | 730 | if(C == '^'){subsup = 1;c++;space = 3;baseline='bottom';C = txt.charAt(c);};\ |
|
- | 731 | if(C == ' '){if(subsup == 1){space = 8 - (ctx.measureText('M').width);subsup = 0;};baseline = 'middle';};\ |
|
- | 732 | ctx.textBaseline = baseline;\ |
|
- | 733 | ctx.fillText(C,w,y);\ |
|
- | 734 | ctx.stroke();\ |
|
- | 735 | w = space + w + ctx.measureText(C).width;\ |
|
- | 736 | };\ |
|
- | 737 | ctx.restore();\ |
|
- | 738 | return;\ |
|
- | 739 | };"); |
|
719 | break; |
740 | break; |
720 | 741 | ||
721 | case DRAW_TEXTFILL:/* not used for userdraw */ |
742 | case DRAW_TEXTFILL:/* not used for userdraw */ |
722 | fprintf(js_include_file,"\n/* draw textfill */\ |
743 | fprintf(js_include_file,"\n/* draw textfill */\ |
723 | var text_fill_pattern;\ |
744 | var text_fill_pattern;\ |