vis_files/button.js
/// Plots left-aligned vertical text
Plots left-aligned vertical text
Plots left - aligned vertical text
function plotverticaltext(text,x,y,font,col,width)               
{	
	if(text == undefined){ text = "undefined"; pr("undefined text");}
	if(text.length == 0) return;
	if(!width) width = large;
	text = text.toString();
	var lab = splitintosub(text,font);
	cv.save();
	cv.translate(x, y);
	cv.rotate(Math.PI/2);
	cv.textAlign = 'left';
	cv.fillStyle = col;
	var j;
	for(j = 0; j < lab.length; j++){
		cv.font = lab[j].font;
		cv.fillText(lab[j].frag,lab[j].w,lab[j].dy);
	}
	cv.restore();
}
function plotverticaltext ( text , x , y , font , col , width ) { if ( text == undefined ) { text = "undefined" ; pr ( "undefined text" ) ; } if ( text . length == 0 ) return ; if ( ! width ) width = large ; text = text . toString ( ) ; var lab = splitintosub ( text , font ) ; cv . save ( ) ; cv . translate ( x , y ) ; cv . rotate ( Math . PI / 2 ) ; cv . textAlign = 'left' ; cv . fillStyle = col ; var j ; for ( j = 0 ; j < lab . length ; j ++ ) { cv . font = lab [ j ] . font ; cv . fillText ( lab [ j ] . frag , lab [ j ] . w , lab [ j ] . dy ) ; } cv . restore ( ) ; }
Plots left-aligned vertical text
Plots left - aligned vertical text