Help - Canvas Path not show in Android #2132
Description
Hello,
I'm using canvas to be able to draw a signature, but on Android it can't work. Canvas can't draw strokes on Android, but when I use const image = refCanvas.current?.makeImageSnapshot(); and const base64 = image?.encodeToBase64(); I still get the image I drew.
Here is my code: <Canvas ref={refCanvas} onTouch={touchHandler} style={styles.vCanvas}> {paths.map((path, index) => { const findStroke = PStroke?.find(elm => elm.index === index); return ( <Path key={index?.toString()} path={path} style="stroke" strokeCap="round" color={findStroke?.valueColor || selectStroke.color} strokeWidth={findStroke?.valueWidth || selectStroke.width.value} /> ); })} </Canvas>
It's very basic but it can't be displayed, on IOS it works normally.
IOS:
https://github.com/Shopify/react-native-skia/assets/71163774/0c34c732-7af1-48b7-a828-f7061be5afbf
Android:
https://github.com/Shopify/react-native-skia/assets/71163774/e0484501-770a-4437-b013-a2e1bc544d46
Version
0.71.7
Steps to reproduce
- Install library
- Used code exemple
- Check it on Android
Snack, code example, screenshot, or link to a repository
AndRoid: https://github.com/Shopify/react-native-skia/assets/71163774/e141b2a7-4fae-44f5-b388-10d36e77e9e0
IOS: https://github.com/Shopify/react-native-skia/assets/71163774/bb92b902-7d75-45e3-9ecb-5e1c3130d1d9