views:

38

answers:

1

I have a C# application which renders 2D graphics into bitmaps using System.Drawing.Graphics. I now want to port this application to work on normal .net on windows, mono on linux and in Silverlight/Moonlight.

But at least Silverlight is lacking System.Drawing. Since I don't want to maintain several copies of my rendering code I need one cross platform graphics library.

I see a few alternatives to achieve that:

  1. Use a library available on all platforms
  2. Use a port of System.Drawing to silverlight
  3. Write a wrapper around the graphics libraries of the different platforms myself

I'm trying to avoid 3) due to the required work. So does anybody know a free library for 1) or 2)? Library should have a reasonable license, i.e. free and not GPL (LGPL is fine).

+1  A: 
  1. There is no common library that does the sort of things that System.Drawing does.
  2. This would be a massive undertaking for very little payback.
  3. Of these options this is the only one that is viable.

I'm not sure what sort of graphics you are doing but have you considered XNA? I don't know about its Mono credentials but via Silversprite you might be able to build stuff that compiles for both .NET and Silverlight.

AnthonyWJones