praeclarum / NGraphics

NGraphics is a cross platform library for rendering vector graphics on .NET. It provides a unified API for both immediate and retained mode graphics using high quality native renderers.
MIT License
710 stars 133 forks source link

Support for UWP #63

Closed TomSoderling closed 7 years ago

TomSoderling commented 8 years ago

This is my attempt at support for Universal Windows Platform (UWP). I followed a pretty basic monkey-see, monkey-do approach and added a new NGraphics.UWP project that relies on the existing implementation for the WinRT platform which seems to work well on UWP also. I included a new test project for UWP and it produces test files as I'd expect Took this opportunity to update to the brand spankin' new SharpDX v3.1.0 library as well I believe VS 2015 update 3 is required to open and run the UWP project

Let me know if I screwed something up and I'll try to fix it

laarmen commented 7 years ago

Unless I am mistaken it is not possible to test this PR! At least, I can't see the repo/branch it originates from, which means I can't pull the code.

TomSoderling commented 7 years ago

@laarmen Ah, thanks for pointing that out. I didn't realize it was saying "from unknown repository". I wonder if that's because I'm part of an organization github account? This is where the source branch is, under my company Mobile Composer: https://github.com/MobileComposer/NGraphics/tree/UWP_Support

edit: now I know, I once accidentally deleted the source branch after the PR was made.

squinn7 commented 7 years ago

Is there any update on this PR? I would be very interested in seeing UWP support but it doesn't seem like this request is being updated anymore.

praeclarum commented 7 years ago

Sorry for the long delays and thank you for the great work @TomSoderling!

I'll try to get this into the next release.

TomSoderling commented 7 years ago

Fantastic! Thank you!

jasells commented 7 years ago

Is there an ETA on the next release? I reeealy need UWP support.

TomSoderling commented 7 years ago

I'd try reaching out to Frank on twitter: @praeclarum

gabornemeth commented 7 years ago

I feel 0.5.0-beta1 works well on UWP too. :thumbsup: I managed to update my fork of NControl with it.

I noticed SurfaceImageSourceCanvas in NGraphics.UWP and tried to use it. It does not seem to work right now. Is it planned to be used? I played around with it trying to use this way. It showed some signs of operation. Finally I gave up that and fell back using the ICanvas returned by the Platform.

jasells commented 7 years ago

Just FYI, I have abandoned Ncontrol, because of the apparent lack of activity, and what I believe to be a more viable alternative.

SkiaSharp

More info

No slam on NControl, but my assumption for the lack of activity in general has been that many people are making the same decision. Skia is actively maintained by google, is a cross-platform API (as opposed to NGraphics using 'native' API's for each platform) so it will be easier to maintain. SkiaSharp is maintained by the Xamarin team (Microsoft), so I feel much more confident it will continue to be viable.

My team is almost finished porting our NControl code to SkiaSharp, and it has not been too difficult.

Another advantage of SkiaSharp is that it is also compatible with WPF and Windows forms, if you want to develop Linux/Windows desktop apps.

gabornemeth, Thanks for your efforts, at the very least it is a possible short term solution for those who can't or don't want to move from NControl yet.