iddan / react-native-canvas

A Canvas component for React Native
MIT License
981 stars 172 forks source link

getting an Object instead of Boolean by using isPointInStroke #335

Closed gun-ctrl closed 2 months ago

gun-ctrl commented 2 months ago

This is part of my sample code: This method is used to determine the effective click range,I get an Object instead of Boolean and there are no error

cxt = canvas.getContext('2d'); function isInCricle(x, y) { cxt.beginPath(); cxt.lineWidth = arcRadio; cxt.arc(center, center, radius, Math.PI 0.32, Math.PI 0.68, false); return cxt.isPointInStroke(x, y); }

iddan commented 2 months ago

Please use await

gun-ctrl commented 2 months ago

Please use await

Hi iddan,I have tried to use await, but the issue has not been resolved. image

gun-ctrl commented 2 months ago

Please use await

Thank a lot,the issue have been solved