azchohfi / LottieUWP

UWP port of Lottie(https://github.com/airbnb/lottie-android)
Apache License 2.0
274 stars 45 forks source link

WPF support #19

Closed kitgrose closed 6 years ago

kitgrose commented 6 years ago

Our apps have a lot of dependencies on legacy hardware that prevents us from effectively migrating away from WPF to UWP, but as Lottie users on iOS & Android we'd love to be able to benefit from Lottie end-to-end.

What would be involved in migrating this work over to be compatible with WPF apps? Does it have dependencies on UWP-specific features?

azchohfi commented 6 years ago

Right now, we are using Win2D to draw the vectors on-screen, so it would not be possible to port it without a quite large effort in terms of replacing Win2D with something else, like DirectX or XAML based shape drawing. If you want to, be my quest, but it’s not a scenario that can be easily done with the way the code works right now. It you look at the git history, there was a version of LottieUWP that didn’t use Win2D, but XAML based shape drawing. Maybe it would be easier to start from that.

Other things like Rect, Color and Vector, can be easily achieved by simple replacing the namespaces from Windows. to System.Windows. (or similar). Json.Net is also perfectly portable, so the only thing really is Win2D.

Since this is not a scenario that we are looking to support, I'm going to close the issue.

JohnnyWestlake commented 6 years ago

(If anyone wants too, you can try porting it over with SharpDX, which exposes all of the same Direct2D stuff that Win2D does, just in a slightly more complex way).