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

Images with resizeMode "cover" loses its borderRadius #9

Closed
t1mp4 opened this issue Aug 14, 2024 · 1 comment
Closed

Images with resizeMode "cover" loses its borderRadius #9

t1mp4 opened this issue Aug 14, 2024 · 1 comment

Comments

@t1mp4
Copy link

t1mp4 commented Aug 14, 2024

(Not sure if "issue" or "question")

Images with resizeMode "cover" loses its borderRadius.

This is expected because it clips the element, however, it would be nice if it would keep the borderRadius.

<View style={{ width: 300, height: 300, borderRadius: 12 }}>
    <View
        src="http://some-external-site.com/image.png"
        textureOptions={{
            resizeMode: {
                type: "cover"
            }
        }}
        borderRadius={12}
    />
</View>

My workaround right now is to add a transparent overlay with a border and border radius, but it's wonky.

Is there a better method?

@t1mp4 t1mp4 closed this as completed Aug 14, 2024
@chiefcll
Copy link
Contributor

Reposted to Lightning Renderer: lightning-js/renderer#357

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