Question

There are about four implementations I can think of that are capable of loading SVG graphics into a Delphi application.

One of those, by Mattias Andersson, who is the author of FMX.Canvas.VPR , works with FireMonkey, but he's not yet prepared to release the code.

A second one, by Martin Walter, works with the VCL, but developer has quit Delphi and has no plans to convert to FireMonkey.

A third one, part of the AGGPAS framework, works with the VCL, but no FireMonkey.

A fourth one is in development by Jason Southwell, but no date has been fixed yet.

So my question: what road to take if I want an SVG component today, without trying to reinvent the wheel a fifth (and probably more) time?

Was it helpful?

Solution

The SVG component I've been working on has been released as part of our Apesuite for Firemonkey.

http://arcana.sivv.com/apesuite

OTHER TIPS

I'm Mattias Andersson -- the author of FMX.Canvas.VPR; I can say that I'm still actively working on the SVG solution. I guess once I have properly added support for gradients and text rendering then I can release a first beta version. I'm relying on TXMLDocument and that is a bit restrictive in what you are permitted to do (IMO), so I've had to invent some workarounds (maybe a better option would have been to implement my own XML class from scratch.) Also, I've had to do some run-time patching of the FireMonkey classes in order to make everything work correctly. The good part is that I'm actually implementing things according to the SVG interface specifications.

Getting involved with Mattias Andersson in the development is the best option:

  • FMX.Canvas.VPR by Mattias Andersson looks promising and VPR is proven to be an excellent project
  • No spoon-fed SVG FireMonkey component working out-of-the-box is available as of the time of posting (extensive web search made in general).

You could also consider using Chromiumembedded. Just load the svg in the embedded browser. You can then mix Delphi code with javascript, mix in html and css, etc.

This way, you can just leave it up to Chrome how to draw stuff fast (for example whether to employ gpu acceleration or not).

You'll get proper svg support, it's easy to integrate into your application, it's flexible, and there is lots of documentation and example code available online.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top