Placing CANVAS inside an SVG, is it possible?

Asked

Viewed 52 times

0

I’m trying to create a quiz for visitors to the page to mark where they’re feeling pain in their body. My idea was to generate an area that was possible to draw/paint but that was delimited by the body.

I then created the SVG below to map the areas just for example

Corpo

Still below I managed to find a script that allows drawing on the screen using the HTML canvas but my knowledge is little and I could not find another way to execute what I would like.

Área de desenho

At first I don’t want to store anything from the quiz output. It’s just for display in the user session. Below I show you the example of how I would like you to stay. If anyone knows any other way to do that you don’t need to use canvas...

Corpo

  • Canvas and SVG are different things. I would suggest using one or the other. I believe that in the same way that it is possible to draw in canvas, also in SVG would have a shape. I suggest using the image on the canvas and allow the user to draw on top.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.