Multiple clipping areas on Fabric.js canvas
For making Photo Collage Maker , I use fabric js which has object based clipping feature. This feature is great but image inside that clipping region cannot be scaled, moved or rotated. I want fixed position clipping region and image can be positioned inside the fixed clipping area as user want. I googled and find very near solution var canvas = new fabric.Canvas('c'); var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.rect(10,10,150,150); ctx.rect(180,10,200,200); ctx.closePath(); ctx.stroke(); ctx.clip(); Multiple Clipping Areas on fabric js canvas where image of one clipping region is