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

Path not rendering correctly #2258

Closed
ashwin-jacob opened this issue Apr 16, 2024 · 1 comment
Closed

Path not rendering correctly #2258

ashwin-jacob opened this issue Apr 16, 2024 · 1 comment

Comments

@ashwin-jacob
Copy link

ashwin-jacob commented Apr 16, 2024

Bug

After upgrading from React Native SVG 13.4.0 to 14.1.0, we are running into rendering issues specifically using Path. One specific Path is causing a small black trace, while every other path I render doesn't.

What Expo is showing
CleanShot 2024-04-16 at 13 41 02

What it should be
CleanShot 2024-04-16 at 13 54 38

Code

      <Svg viewBox="0 0 310 248">
        <Path
          d={'M 22.5 154.99999999999997 A 150 132.5 0 0 1 89.47 39.83'}
          stroke={'#FF6E52'}
          strokeWidth="14"
          strokeLinecap="round"
        />
      </Svg>

Environment info

Expo Version: 50.0.0
Library version: 14.1.0

Short, Self Contained, Correct (Compilable), Example

https://snack.expo.dev/@ashwin-soundadvice/54245a?platform=web

@jakex7
Copy link
Member

jakex7 commented May 16, 2024

Hello @ashwin-jacob,
I've been looking into this and according to the MDN Docs, if you don't specify the fill prop (on the path element) should be set to black by default. This means the component works as expected (according to the specification). I checked the code you posted, and it works exactly the same in the browser. If you want to achieve the results you have posted, all you need to do is add fill="none" or fill="transparent" to the path element.

image

If you've noticed any other problems, feel free to open an issue.

@jakex7 jakex7 closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants