mercredi 17 novembre 2021

How to add an empty Frame to Fabric canvas

I have created a canvas with Fabric JS. I am done with adding objects etc. to my App.

How can I add an empty Frame(like Rect) to my canvas which should be Movable, Resizable and I should also be able to add Image in that frame. The Image which I add to frame shound be visible inside that frame not outside of frame?

Rereference:

Empty Frame:

enter image description here

Frame with picture added:

enter image description here

As we can see, the picture is only visible inside the frame. My canvas already has a background Image.




Aucun commentaire:

Enregistrer un commentaire