SVG image element
Web/SVG/Tutorials/SVGfromscratch/ToolsforSVG
Web/SVG/Tutorials/SVG_from_scratch/Tools_for_SVG
The SVG image element allows for raster images to be rendered within an SVG object.
In this basic example, a .jpg image referenced by an href attribute will be rendered inside an SVG object:
<svg width="5cm" height="4cm"
xmlns="http://www.w3.org/2000/svg">
<image href="firefox.jpg" x="0" y="0" height="50px" width="50px"/>
</svg>
There are some important things to take note of:
- If you do not set the
xoryattributes, they will be set to0. - If you do not set the
heightorwidthattributes, they will be set to0. - Having a
heightorwidthattribute of0will disable rendering of the image.
Web/SVG/Tutorials/SVG_from_scratch/Tools_for_SVG