当前点到控制点,控制点到末尾点的两个连线,与这两个连线相切;
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>quadraticCurveTo</title> </head> <body> <canvas id='myCanvas' width='200' height='100'> your browser does not support canvas </canvas> <script type="text/javascript"> var c = document.getElementById('myCanvas'); var cxt = c.getContext('2d'); cxt.beginPath(); cxt.moveTo(20, 100); cxt.quadraticCurveTo(60, 50, 100, 100); cxt.lineTo(60, 50); cxt.lineTo(20, 100); cxt.stroke(); </script> </body> </html>