tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.21k stars 1.68k forks source link

fuse a canvas image and a svg layer together #419

Open sedghi opened 2 years ago

sedghi commented 2 years ago

I have two elements: a canvas and a SVG layer: the canvas renders an image and the SVG layer overlays some annotations.

I would like to capture an image by fusing both their contents (the image + its annotation). I was wondering if there is an easy way to do this in dom-to-image

Thanks in advance

sedghi commented 2 years ago

Answer: I ended up getting the parent node, and convert that to image, which did the trick

arlendp commented 2 years ago

try capture the common container of canvas and svg by this lib.