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

Use Path rather than Rect #31

Closed
Kyant0 opened this issue Nov 15, 2023 · 7 comments
Closed

Use Path rather than Rect #31

Kyant0 opened this issue Nov 15, 2023 · 7 comments

Comments

@Kyant0
Copy link

Kyant0 commented Nov 15, 2023

It will be more customizable to achieve blur effect with irregular shapes.

@chrisbanes
Copy link
Owner

This is unlikely to be achievable, as paths aren't feasible to be passed over to a Skia shader. If anyone has any ideas on how to achieve this, let me know.

We probably probably could achieve on Android this (via clipPath).

@Kyant0
Copy link
Author

Kyant0 commented Nov 15, 2023

Is it achievable to use Rect + Shape?

@Kyant0
Copy link
Author

Kyant0 commented Nov 15, 2023

Since I have customed shapes which can't be approximated by RoundRect

@chrisbanes
Copy link
Owner

We'd have to manually write support into the shader to support various shapes, and then include a function to determine whether a pixel is in that shape (usually copied from here). It's not impossible, but very cumbersome.

What shape are you trying to support here?

@Kyant0
Copy link
Author

Kyant0 commented Nov 15, 2023

the "cut corner" shape

@Kyant0
Copy link
Author

Kyant0 commented Nov 15, 2023

I only use Compose for Android, but this library is multiplatform. I think it is hard to achieve this, or are you able to provide some Android specific API?

@chrisbanes
Copy link
Owner

Released in 0.4.0

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