Closed lavrton closed 1 year ago
Hi Anton, This is feedback from our designers. They'd would want to use SVG as the "frame" and drag and drop a photo into that frame. Basic shapes could work too, but a lot of times designers like to add rich design to these frames.
but a lot of times designers like to add rich design to these frames
Can you share how will it look visually? How does frame look? How it looks with image?
Just to the note, this function is partially implemented via svg
element.
@lavrton How can this be done using svg ?
@p-mohamed-elsawy there are two ways to make it work in Polotno right now.
image
element and set clipSrc
to cut image content.svg
element and set maskSrc
to fill svg with image.The image DEFAULT_SECTIONS has a masking functionality, I upgraded to "polotno": "^2.8.3", today and was pleasantly suprised. 🙂
I want to have the ability to mask a shape with and image. Or in other words, I want to have the ability to "clip" image element by basic shapes.
Example (this is a regular rectangle image, clipped by circle shape):
Now the question is what will be the better API?
Should
svg
element have ability to be filled by image? Or shouldimage
element have ability to be clipped by some shape?How other apps are working there? Canva, Crello, others?