10

I'm working on a multiplatform project (Linux, OSX, iOS, Win32) so I need Mono for portability. My project needs to load and work with SVG images and their elements for dynamic vector visualizations, something that SVG does best. Considering that SVG is an open standard it is very strange that there is no portable implementation of it. Java has the wonderful SVG library Batik, compliant to the SVG specs almost at 100%. Why doesn't Mono have a way to display an SVG image? Am I missing something?

Here is a list of the libraries that I tried and their current state:

  • SVG.NET — Public fork of the old SVG Rendering Engine library. Currently in development. CURRENT STATE: the most complete, still only 70% of the SVG specs implemented, and many basic things missing like gradients, pattern fills, filters, etc.

  • SharpVectors — Another fork of the SVG Rendering Engine Library. Last updated in 2011. CURRENT STATE: only 50-60% of the SVG specs implemented.

  • SVG Rendering Engine Library — A fork of the old SVG# library. Development stopped. Last updated in 2008. CURRENT STATE: only 40% of the SVG specs implemented

  • SVG# — Its a incomplete port of the excellent java library Batik to C#. Abandoned since 2005. CURRENT STATE: only 30% of the SVG specs implemented

  • Gtk# Rsvg — It's a C# wrapper around librsvg, a library written in c and based on Cairo CURRENT STATE: not tested because not portable on iOS

I've submitted some bug reports 84 82 83 to the first project, the most advanced one. But the not implemented parts are still too many. Especially considering that on non-Windows platforms, the library uses the Mono System.Drawing assembly library, and that is even more incomplete (just count the "not implemented exceptions" in the code). And even less the OSX/iOS version.

EDIT: For my project I need an SVG library with the following requirements:

  • Must allow to load, render, modify and save SVG image files with decent performances.
  • Must be a Mono library.
  • Must be written in C# (no wrappers to c libs).
  • Must be multiplatform (must run on Linux, OSX, iOS, Win32, so no system specific calls).
  • Must be open source.
  • Must be fully compliant with the SVG 1.1 specifications.
  • Must be able to compile using only Mono libraries.

SVG.NET rendering of balloons.svg

5
  • Emanuele, could you please specify your exact requirements? For guidance, you can take a look at What is required for a question to contain "enough information"? Thanks!
    – Izzy
    Aug 3, 2014 at 20:43
  • @Izzy : As you requested I've added the things that I'm searching for. Aug 3, 2014 at 22:26
  • Thanks a lot! Good luck with your hunt – chances are much better now :)
    – Izzy
    Aug 4, 2014 at 5:36
  • SVG.NET supports gradients and patterns, I tested myself. Main problem with it that it depends on System.Drawing that basically doesn't work on Android. It sounds theoretically possible to migrate System.Drawing to Android, for that you need to build libgdiplus that has bunch of other binary dependencies.
    – Andrey
    Mar 17, 2015 at 14:55
  • I think it won't exist if there is no text shaping and layout engine written in C#. It is really a very big problem for cross-platfrom rendering.
    – zwcloud
    Feb 4, 2017 at 9:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.