SVG support?

[quote=106081:@Emile Schwarz]The complementary question is:

which formula of handling of vectorial drawings (drawing, to open and save) do we have with Xojo?[/quote]

None. We used to have PICT support but it was dropped (sadly). Ticket 10931 asks for vector support (I think I’m subscribed to this but I can’t check from the phone).

Mac-only there’s some cocoa declares that could be used to create them but it’s complex and single-platform.

I wouldn’t mind getting pict support back in as a plugin (or a similar one). The ideal would be a single vector graphics wrapper library for x-plat native methods.

Xojo supports standard image formats for vector graphics.
Double entendre sentence ?

Yes, Xojo support vector graphics.

For the read / write operations… this is a different matter.

For the vector graphics support in Xojo, I will not make suggestions and let Xojo decide. The only requirement is to get them before I died (I already lost two older brothers and I am now older than them when they died; like every one, days are counting, a bit more for me than others, but they are counting).

AFAIK, PICT support is deprecated in OS X.

It is, but I never used it so I don’t know if the PICT implementation in Xojo was their own (if it was cross-platform I assume it was), in which case it’s irrelevant if the OS supports it, as long as the programming language does.

I’m not asking for PICT, by the way. I’m asking for any vector-based drawing format supported natively. PICT existed already, while WMF was supported only in Windows, IIRC. The feedback case I’m subscribed to (and at least one I create) ask for SVG. I don’t care about the format itself, as it’s irrelevant to me. I want to use it in-app so it could be 100% custom and it would work.

SVG is the current de-facto industry stardard for web (web graphics) and exchanging vectorial drawings. So I do care about the format. Scalable Vector Graphics (SVG) 2 :wink:

PICT is still supported in Xojo for loading : http://documentation.xojo.com/index.php/FolderItem.OpenAsVectorPicture

I just tested and it works fine.

I suppose the only desirable way to save is now SaveAsWindowsEMF. Yet, seems that saving as PICT still works, except Mavericks has no idea what to do with it.

I didn’t explain myself: I couldn’t care less what standard is used to draw into the UI of Native Applications.

SVG works for me, but I’d only wish for it if I wanted to deliver graphics. For using them in my code to generate widgets and UI stuff, anything works.

If I used the Web target I’d probably care more that web standards are used, obviously.

It used OS functionality, which is why we dropped support for it (PICT is very dead).

Understandable. I never used it, so I didn’t know if it worked in Windows (which would have required an internal implementation).

I had read somewhere that Object2D was being deprecated. If this is the case then it’s a problem. If it’s not, perhaps it could be possible to map SVG to Object2D Code?

I tried for a while to map Cocoa drawing from paintcode into Object2D but didn’t get much further than the most basic translation.

Apparently there are command line SVG-EMF converters around. Since Xojo is EMF capable, it could be a solution, pending Xojo SVG support, if and when available.

Yeah, SVG is only implemented in WebKit and not as a general purpose Cocoa framework feature. I suspect it’s due the SVG spec being somewhat tied to the web (e.g. external style sheets).

EMF is only supported on Windows.

So no vector format on OS X ?

I could be wrong, but I think EMF (like WMF before) is only supported in Windows.

At the moment, no. Saving an Object2D graph as a PDF wouldn’t be insanely hard, but reading it in would be unpleasant. Supporting most of the SVG tiny profile would probably be doable, but I suppose it comes down to the typical “do enough people want it to justify the feature” argument.

…and that is a fair enough argument… for the record I’d like to add my +1 support for the SVG argument ;-).

Even if it is just SVG tiny, it would already go a long way in helping with the development of vector based graphics in Xojo.

Vote with your Feedback points.

Already did…

[quote=106130:@Alwyn Bester]…and that is a fair enough argument… for the record I’d like to add my +1 support for the SVG argument ;-).

Even if it is just SVG tiny, it would already go a long way in helping with the development of vector based graphics in Xojo.[/quote]

Taking a look at libsvgtiny. Has MIT license and doesn’t output images but paths and texts.

Will vote the feedback ticket, too.

I gave some love to SVG too. Now in the top 30.

There is an example for drawing Object2D into PDF using DynaPDF in our plugin examples.