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

FR: Expose APIs to apply elevation and shape to the internal AsyncImage in ZoomableAsyncImage #42

Open
ZacSweers opened this issue Aug 28, 2023 · 2 comments
Assignees

Comments

@ZacSweers
Copy link

Currently it's not possible to apply shape clips or elevation to the internal AsyncImage as the modifier on ZoomableAsyncImage() applies them to the whole layout

@ZacSweers
Copy link
Author

another thing I'd like to do is use the blur() modifier, but that needs to apply on the image itself as well

@saket saket self-assigned this Jan 23, 2024
@saket
Copy link
Owner

saket commented Jan 24, 2024

I'm going to partially address this using 0347c53. It's a low level API for observing content bounds that can be used for drawing decorations around the content. Here's an example test that draws a border around the content (screenshot). I haven't tried it out, but you should also be able to apply clipping and draw drop shadows. I'll probably add a Modifier.clipToZoomableBounds(zoomableState) to make this easier.

another thing I'd like to do is use the blur() modifier, but that needs to apply on the image itself as well

This should already be possible! Does it not work for you?

ZoomableAsyncImage(
  modifier = Modifier
    .fillMaxSize()
    .blur(20.dp),
  …
)

Screenshot_1706076894

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