Canvas で遊んでみる 3
昨日の 画像回転 bookmarklet を 0度から360度の任意の値に対応した。
javascript:(function(){var l=location.href;var deg=prompt("0-360","");location.href='data:text\/html;charset=utf8,<html><head><script type="text\/javascript" src="http:\/\/labo.higeorange.com\/js\/rotate.js"><\/script><\/head><body onload="draw(\''+l+'\','+deg+')"><canvas id="canvas"><\/canvas><\/body><\/html>'})();
JavaScript の部分が長くなったので外部化している。
http://labo.higeorange.com/js/rotate.js