OK I think I found out what is actually causing the issue… It looks like something alwyn did not consider…
His code does not handle the situation where there is more than one view box
This SVG XML fragment of the SVG file (I am only copying the relevant part) does not work right:
[code]<?xml version="1.0"?>
<svg version=“1.1” id=“topsvg”
xmlns=“http://www.w3.org/2000/svg” xmlns:xlink=“http://www.w3.org/1999/xlink”
xmlns:cml=“http://www.xml-cml.org/schema” x=“0” y=“0” width=“300px” height=“300px” viewBox=“0 0 100 100”>
If I edit the file to this:
[code]<?xml version="1.0"?>
<svg version=“1.1” id=“topsvg”
xmlns=“http://www.w3.org/2000/svg” xmlns:xlink=“http://www.w3.org/1999/xlink”
xmlns:cml=“http://www.xml-cml.org/schema” x=“0” y=“0” width=“300” height=“300” viewBox="0 0 941.051 941.051">
Apparently one can have hierarchical viewboxes and he does not support that…
I know that the software I am using put text in the SVG that is independent of the drawn structure a well as other elements.
I suspect that the second view box has the dimensions of the drawing commands for the structure so that teh structure ca be scaled independently (or within) of other elements in the SVG…
But as I don’t know the SVG spec I don’t know how to modify his code for general use…
As i don’t need anything BUT the structure I can customize his code for my specific use…
If thee is an SVG expert here, it would nice if they could extend what he did for fuller SVH support…
This open source project will never be 100% because he relies on Object2Ds and they are too limited… Never the less fuller SVG support would help the community…
As i said before Xojo inc SHOULD at least support rendering SVG with losses scaling, even if an API for us to create them would be too big a job…
There has to be some good, fast code they can license at a reasonable price and integrate into the framework to do that just that!!!
Supporting a standards based platform and application indpendant vector format is getting to be more and more important with the proliferation of resolutions and screen sizes for all the 1platforms/devices Xojo is looking to support!
I know MBS has a plugin that can handle SVG to some degree, but besides not having a current license, I find the MBS plugins in general not very “citizen developer”/RAD friendly… Figuring this out is likely faster than trying to figure out how to makethat plugin (or figure out if it can) do what i want!
In any case if Alwyn’s code (with my mods for this use case) is fast enough, I think i have my solution for this specific application.
- Karen