canvas(width="870", height="800")
View Compiled
canvas {
// outline: 1px dashed crimson;
transform: scale(0.5);
transform-origin: 0 0;
}
View Compiled
function draw() {
const canvas = document.querySelector("canvas");
if (canvas.getContext) {
var ctx = canvas.getContext("2d");
ctx.beginPath();
ctx.moveTo(800, 100);
ctx.bezierCurveTo(860, 270, 850, 600, 650, 750);
ctx.bezierCurveTo(500, 850, 50, 750, 20, 500);
ctx.bezierCurveTo(0, 200, 750, -80, 800, 100);
ctx.fillStyle = "crimson";
ctx.fill();
}
}
draw();
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.