Adding Watermark Inside SVG Without Covering Entire Bounding Box in Fabric.js #10424
yashChapaniOB
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Fabric.js Community @asturur ,
I'm working on a project where I load an SVG onto the Fabric.js canvas and programmatically add a watermark image inside the SVG itself. My goal is to embed the watermark only within the main SVG path or content area—not outside or covering the entire bounding box.
https://jsfiddle.net/j6o0cv71/
Current Behavior:
The SVG loads correctly on the canvas.
The watermark is added, but I want to make sure it stays within the main SVG content area and does not cover large portions of the bounding box or render outside the SVG entirely.
Expected Behavior:
Watermark Inside SVG Content:
The watermark should be placed only within the visible content of the SVG (e.g., inside paths or shapes) and not in empty or padding areas around the SVG.
Beta Was this translation helpful? Give feedback.
All reactions