Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help - Canvas Path not show in Android #2132 #2133

Open
VuDinhVN opened this issue Jan 11, 2024 · 0 comments
Open

Help - Canvas Path not show in Android #2132 #2133

VuDinhVN opened this issue Jan 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@VuDinhVN
Copy link

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:

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

  1. Install library
  2. Used code exemple
  3. 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

@VuDinhVN VuDinhVN added the bug Something isn't working label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant