Open gun-ctrl opened 2 months ago
I have tried to test isPointInStroke
,but the result still is "false".
cxt.beginPath();
cxt.lineWidth = arcRadio + 50;
let path = new Path2D(canvas);
// path.arc(center, center, radius, Math.PI * 0.32, Math.PI * 0.68, true);
path.moveTo(60,60);
path.lineTo(160,60);
cxt.strokeStyle = 'red';
let result = await cxt.isPointInStroke(path, 100, 60);
@iddan
This is part of the code: the function is used to determine the effective click range,but the return value has a large deviation by using isPointInStroke.