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

Cannot use custom radii for rounded rectangle #2395

Open
ava-m-c opened this issue Apr 22, 2024 · 0 comments
Open

Cannot use custom radii for rounded rectangle #2395

ava-m-c opened this issue Apr 22, 2024 · 0 comments

Comments

@ava-m-c
Copy link

ava-m-c commented Apr 22, 2024

I tried to create a rectangle with only the top corners to be rounded, but this always gives me a runtime error, despite following the format from the documentation. I tried to use it like this

const barPath = Skia.Path.Make();
barPath.addRRect({
  rect: { x, y, width, height },
  topLeft: { x: r, y: r },
  topRight: { x: r, y: r },
  bottomLeft: { x: 0, y: 0 },
  bottomRight: { x: 0, y: 0 },
});

I followed the described format from the documentation and the allowed type as I find it in the TS code. However, I still get a runtime error saying 'Exception in HostFunction: Value is undefined, expected a number'. I get a runtime error for both the Path.Make method and using the RoundedRect component directly. So, it seems to me something might go wrong somewhere behind the scenes in the source code when handling the bottom/topLeft/Right props.

Originally posted by @ava-m-c in #2371 (comment)

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

1 participant