I have a canvas with dimensions width = 100pxandheight = 150px
I need to make crooked strings using function bezierCurveTo()
.html
<canvas id = "canvas" width = "100" height = "150"></canvas>
.ts
var canvas = <HTMLCanvasElement>document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.strokeStyle = 'white';
ctx.beginPath();
ctx.lineWidth=3;
ctx.moveTo(40,0);
ctx.bezierCurveTo();
ctx.lineTo(100,150)
ctx.stroke();
What dimesions should be filled in the function bezierCurveTo()in rdr in order to look like a curved line exactly in the screenshot.

Ingnore the dotted lines in the screenshot.
source
share