Posted in Javascript onSeptember 17, 2013
function create5StarClip(context) { var n = 0; var dx = 100; var dy = 0; var s = 150; context.beginPath(); context.translate(100,150); var x = Math.sin(0); var y = Math.cos(0); var dig = Math.PI / 5 * 4; for(var i = 0; i < 5; i++) { var x = Math.sin(i * dig); var y = Math.cos(i * dig); context.lineTo( dx + x * s,dy + y * s); } context.clip(); }
JS画5角星方法介绍
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@