One solution, which imo isn't probably the best, is to split the meters into either two meters, or two parts of one meter. (kind of similar to how the image meter works)jsmorley wrote:Interesting observations. I think any way we do this, things other than simple shapes like a line or square or rectangle or circle or triangle are going to be complex.
The advantage I see to SVG (assuming it can even be done without having to re-invent the wheel) is that it is both very robust, and is a well-documented format that while not trivial, is something that anyone who has done a fair amount of HTML coding is going to be able to wrap their head around.
The pre-defined shapes in SVG like <circle .. /> are really just shortcuts for common shapes. SVG also allows you to use the <path .. /> form to literally draw any path you want, and it is quite powerful.
I think that the ability in SVG to have several shapes or paths in the same meter is a strong selling point. Having to create 10 complicated meters to "build-up" a complex shape made up of 10 shapes or paths seems horrid to me.
As to a single string or separate elements as separate options on the meter, I'm torn. I can see dgrace's point of view, and having the option of loading a .svg file or download a .svg image from the web has a lot of charm, but I can see a single option string that needs to build multiple shapes or paths, using complicated mathematical formulas in it, would quickly get so large and unreadable that it would be a nightmare. It would really almost force you to a Lua solution, where you would use the "programming" capabilities of Lua to define the elements of the option string, and then send the final result to the skin with !SetOption.
Of course all of that is predicated on being able to get SVG into D2D capabilities without having to write it from scratch. I think that would just be the Manhattan Project, and I'd recommend against it. If we are going to have to "roll-our-own", then just get as "close to the metal" as you can and start with what D2D can do. That, I suspect, is what you are suggesting.
It is possible to load a custom file(svg, if possible) using a VectorName option (or similar, basically what image does), and then it is possible to define a custom shape the way it currently is, by using options. This way you can create simple animated shapes using points, and if you want static complex vector shapes (which can be animated similarly to how you animate an image, by creating multiple of them / by manually editing the file).
This seems to be the most useful and user friendly option imo.
EDIT:
Seems that the .svg file is just a custom xml format, so any xml parser should be able to parse that kind of file too