I have an existing project, and for drawing images it is based on HTML canvas. Now I want to "migrate" in svg, but I don't know how. With canvas I can draw an image simply with
context.drawImage(img)
where context is an istance of CanvasRenderingContext2D. Is there some sort of context also for SVG?
EDIT
I don't want to draw an SVG image into canvas but I want to replace the canvas with an SVG element. The reason behind this choice is to improve the quality of images. Drawing a .svg picture on canvas element, it is rendered as a .png or .jpg. Drawing a .svg picture on SVG element, it retains the format, and the result is higher quality.