HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <canvas width="160" height="110" id="point">Your browser does not support the canvas element. </canvas><script> var canvas = document.getElementById('point'); var ctx = canvas.getContext('2d'); ctx.beginPath(); // Start a new path ctx.moveTo(0, 0); // Move the pen to (0, 0) ctx.lineTo(150, 100); // Draw a line to (150, 100) ctx.stroke(); </script> </body> </html>
OUTPUT
×

Save as Private