可以快速生成二次、三次貝塞爾曲線的源碼生成器,方便經常使用到canvas畫圖的同學使用,可以直接預覽效果隨意畫出自己想要的圖像。
生成源碼效果預覽:
canvas = document.getElementById("canvas"); ctx = canvas.getContext("2d") ctx.lineWidth = 6; ctx.strokeStyle = "#0090D2"; ctx.beginPath(); ctx.moveTo(118, 264); ctx.quadraticCurveTo(250, 100, 378, 264); ctx.stroke();
來源:http://www.j--d.com/html/367.html