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

Can rounded box be clipped accroding to it's actual shape? #1621

Closed
PixelLantern opened this issue Jun 30, 2023 · 4 comments
Closed

Can rounded box be clipped accroding to it's actual shape? #1621

PixelLantern opened this issue Jun 30, 2023 · 4 comments
Labels
feature request New feature or request good contribution Good, isolated issue for someone that wants to contribute visualize Related to drawing and visualizations.

Comments

@PixelLantern
Copy link

PixelLantern commented Jun 30, 2023

Description

As we can set a box's radius, can we clip it's content accroding to it's actual shape?
using a scaled image with white background, we can simulate expected rounded-rectangle-shape clipping effect
1
2

Use Case

We can use this feature to create a image in rounded rectangle shape, just like the effect below
3

@PixelLantern PixelLantern added the feature request New feature or request label Jun 30, 2023
@laurmaedje
Copy link
Member

It doesn't work at the moment, but you're totally right that it should.

@LaurenzV
Copy link
Sponsor Collaborator

Related: #737

@laurmaedje laurmaedje added the visualize Related to drawing and visualizations. label Jul 6, 2023
@virtualritz
Copy link

That would then also allow clipping of images with other shapes, ideally SVG or the like, at some stage, right?

At the moment, I just want to clip a picture against a circle, e.g.:

let photoBlock = circle(radius: 4cm, image("portrait.jpg"))

@laurmaedje laurmaedje added the good contribution Good, isolated issue for someone that wants to contribute label Sep 18, 2023
@laurmaedje
Copy link
Member

Fixed by #2338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good contribution Good, isolated issue for someone that wants to contribute visualize Related to drawing and visualizations.
Projects
None yet
Development

No branches or pull requests

4 participants