- This topic is empty.
-
AuthorPosts
-
December 20, 2015 at 10:20 pm #236056
Aks
ParticipantHi. Currently I am facing issue with rendering images from svg file referenced in a parent svg.
I have an svg file named “renderChild2.svg” that has an image tag to refer to a jpg image. When I run this svg file independently it renders the image on IE9.Now I have a parent svg file “Main.svg” that refers two svg’s files.
One of which has inline rect and line tags named “renderChild1.svg” and the other being “renderChild2.svg”
The “Main.svg” renders only from renderChild1.svg while renderChild2.svg image is not seen. Please share your views on it.Below is the code snippet:
renderChild1.svg:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
<svg xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink” width=”400.000000″ height=”277.000″>
<image x=”0.000″ y=”3″ width=”100%” height=”100%” xlink:href=”d:/skyspace.jpg” />
</svg>renderChild2.svg:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
<svg xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink” width=”320.000000″ height=”328.000″ >
<rect x=”45″ y=”-1213.600″ width=”30″ height=”20417.229″ style=”stroke:white; fill:white;”/>
<line x1=”45″ y1=”-1213.600″ x2=”45″ y2=”19203.629″ style=”stroke:blue;stroke-width:1;”/>
<line x1=”75″ y1=”-1213.600″ x2=”75″ y2=”19203.629″ style=”stroke:blue;stroke-width:1;”/>
<line x1=”45″ y1=”-1213.600″ x2=”34″ y2=”-1213.600″ style=”stroke:blue;stroke-width:1;”/>
<line x1=”75″ y1=”-1213.600″ x2=”86″ y2=”-1213.600″ style=”stroke:blue;stroke-width:1;”/>
</svg>Main.svg:
<?xml version=”1.0″ standalone=”no”?>
<!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1//EN” “http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd”>
<svg version=”1.1″ xmlns=”http://www.w3.org/2000/svg” xmlns:xlink= “http://www.w3.org/1999/xlink”>
<image xlink:href=”C:/Users/e208640/Desktop/renderChild1.svg” x=”0″ y=”0″ width=’320.000′ height=’277’/>
<object viewBox=”0 0 1024 768″ data=”C:/Users/e208640/Desktop/renderChild2.svg” type=”image/svg+xml”>
</svg>December 21, 2015 at 12:18 am #236057Paulie_D
MemberA Codepen.io demo is more use than a codedump.
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.