Roger Bell_West
2018-08-17 19:14:47 UTC
I have two SVG files. Let's call them "map" and "counter". I want to
produce a third file, with "counter" visible on "map". (Probably with
other stuff added round it.)
I've looked at SVG::Parser, and I can decompose "map" into an SVG
object, modify it, and reassemble it. That looks like the right way of
going about things.
But the image method of SVG doesn't embed the content from "counter",
but rather drops it in as a hyperlink, which isn't what I want - the end
result needs to be a single file that doesn't refer to any others.
I've also tried adding a suitable SVG::Element from "counter" into the
"map" structure, walking the parse trees to try to find the right thing
to add and a place to add it, but I'm not getting anywhere with that.
"Using SVG, you can generate SVG objects, embed other SVG instances into
it, access the DOM object, create and access javascript, and generate
SMIL animation content." says the documentation. I specifically want to
embed other SVG instances into it. But I can't see how this is supposed
to work.
Any suggestions?
Roger
produce a third file, with "counter" visible on "map". (Probably with
other stuff added round it.)
I've looked at SVG::Parser, and I can decompose "map" into an SVG
object, modify it, and reassemble it. That looks like the right way of
going about things.
But the image method of SVG doesn't embed the content from "counter",
but rather drops it in as a hyperlink, which isn't what I want - the end
result needs to be a single file that doesn't refer to any others.
I've also tried adding a suitable SVG::Element from "counter" into the
"map" structure, walking the parse trees to try to find the right thing
to add and a place to add it, but I'm not getting anywhere with that.
"Using SVG, you can generate SVG objects, embed other SVG instances into
it, access the DOM object, create and access javascript, and generate
SMIL animation content." says the documentation. I specifically want to
embed other SVG instances into it. But I can't see how this is supposed
to work.
Any suggestions?
Roger