react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Support ToolType in the TouchInfo

Open rhalaly opened this issue 3 years ago • 4 comments

Adding ToolType support that can distinguish Stylus Pen, Eraser, Mouse, or Finger can be helpful for drawing.

For Android: https://developer.android.com/reference/android/view/MotionEvent#getToolType(int) For IOS: https://developer.apple.com/documentation/uikit/uitouch/touchtype

https://github.com/Shopify/react-native-skia/issues/735#tasklist-block-7f95f052-694f-4841-8213-461ec65a5470

rhalaly avatar Aug 06 '22 12:08 rhalaly

Interesting, thanks for the tip!

chrfalch avatar Aug 07 '22 09:08 chrfalch

Remember that PRs are always welcome, so if you want we'd be happy to consider merging this feature.

chrfalch avatar Aug 07 '22 09:08 chrfalch

@chrfalch I wish! I tried to implement it by myself and follow the code, but I got lost in the native code 😞

rhalaly avatar Aug 07 '22 13:08 rhalaly

@chrfalch Are we going to add the suggested feature? I didn't find the option to detect stylus touch in the latest release (0.1.176). I'm developing a writing application and want to restrict it to a stylus. Please help. Thanks

amitsri007 avatar Mar 17 '23 11:03 amitsri007