You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Screen.Recording.2024-01-11.at.15.05.55.mov
Android:
Screen.Recording.2024-01-11.at.15.03.29.mov
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
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();
andconst 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:
Screen.Recording.2024-01-11.at.15.05.55.mov
Android:
Screen.Recording.2024-01-11.at.15.03.29.mov
Version
0.71.7
Steps to reproduce
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
The text was updated successfully, but these errors were encountered: