So, for a project idea, I want to be write a template-based layout editor for a small-ish number of elements (say 5 lines of text and a graphic for each object, between 20 and 40 objects on a page). Ideally I'd like to be able to let people upload SVG elements for the graphic component, but I don't *think* SVG is available as an image type in CPImage.
First question: Am I wrong with that ? The manual does say "CPImage is used to represent images in the Cappuccino framework. It supports loading all image types supported by the browser."
which is promising, but I also find things like this
which would seem to suggest otherwise, unless that's now out of date...
Assuming CPImage doesn't support SVG (because otherwise this is easy :), is my best bet to try and do something similar to what Robert was doing (his github changes are still available) or am I better off just using a CPWebView and loading the HTML as: "render this SVG", bounded by the CPWebView bounds of course ?
Presumably I could apply an affine transform to the CPWebView to allow for rotation handles etc.
These SVGs are going to be relatively simple (think: icons rather than drawings) but as I said above, there will possibly be 40 or so on-screen at once. That seems like a lot of webviews...
Any thoughts very welcome :)
The reason for using SVG rather than generating something internally using paths is that this web-app will be a front-end that lets people create project files that can then be loaded into a third-party program, which natively supports SVG for vector import. If I have to, I'll write the [internal representation using paths] => [svg file as part of project file bundle] but I'd really rather not put a translation stage in unless it's absolutely necessary. Using the native format seems much less error prone.