Announcing SkiaSharp v1.54.1 and SkiaSharp Views

mattleibowmattleibow Matthew LeibowitzZAXamarin Team Xamurai
edited November 2016 in Cross Platform with Xamarin

In this new release of SkiaSharp, are are so many improvements, but this release is really all about our new SkiaSharp Views, Controls and Layers. And SkiaSharp for Xamarin.Forms!

Here are the release notes: https://github.com/mono/SkiaSharp/releases/tag/v1.54.1

SkiaSharp

  • Class library projects that depend on SkiaSharp no longer copy the native files:
    • The class library doesn't need them, only the app does
    • This allows for building the library as Any CPU
    • This applies to macOS/Classic Desktop/WPF/UWP as the other platforms are embedded
    • The native files can be copied by adding an element to the <PropertyGroup> section of the class library:
      <ShouldIncludeNativeSkiaSharp>True</ShouldIncludeNativeSkiaSharp>
  • SKMatrix updates
    • NEW Now property based breaking change
    • NEW Support for reading/writing as a flat array
  • GRGlInterface improvements
    • NEW Added support for creating an ANGLE interface
    • NEW Improved the assembly of a GL interface
  • Massive size reduction for Windows/UWP native binaries

NuGet: https://www.nuget.org/packages/SkiaSharp/1.54.1

NEW SkiaSharp.Views (preview)

A set of pre-prepared UI views, panels and surfaces for drawing. One of these views can be added to the view hierachy, and then be used for drawing without the need for complex setup. There is also a set of extension methods for converting to/from SkiaSharp and native types.

  • Available for all supported platforms (currently using OpenTK except on UWP):
    • iOS/tvOS: CPU/GPU (using OpenGLES) views and layers
    • Android: CPU/GPU (using OpenGLES) views and surfaces
    • macOS: CPU/GPU (using OpenGL) views and layers
    • Classic Desktop/WPF: CPU/GPU (currently using OpenGL) views and elements
    • UWP: CPU/GPU (using ANGLE over DirectX) views
  • Using native features and cross-platform for drawing hooks:
    • iOS/tvOS/macOS: delegates, overrides and events
    • Android: overrides, renderers and events
    • Classic Desktop/WPF/UWP: overrides and events

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.54.1-beta1

NEW SkiaSharp.Views.Forms (preview)

A set of pre-prepared views for Xamarin.Forms, for fully cross-platform drawing code. There are views for both CPU and GPU backends, along with extension methods for converting to/from SkiaSharp and Xamarin.Forms types. Currently available for iOS, Android and UWP.

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.54.1-beta1

Samples

All the samples have been re-written from the ground up to both improve the actual apps as well as to improve the development experience.

Posts

  • EmanueleSabettaEmanueleSabetta Emanuele Sabetta ITBeta ✭✭✭

    Great work, @mattleibow !
    We can finally render animated vector icons in Xamarin.Forms without watching the system slowing down to a crawl, right?

  • softlionsoftlion Benjamin Mayrargue FRBeta ✭✭✭

    @EmanueleSabetta Lol. Instantiating a small xamarin forms datatemplate with bindings 50 times takes 2 full seconds on a phone. You'll be blessed if it works.

    Btw i've a sample of an animated svg here: https://github.com/softlion/XamSvg-Samples but it does not use this SkiaSharp library of course.

  • EddieConnerEddieConner Eddie Conner USMember

    @mattleibow, Are there any examples of using SkiaSharp to annotate an image by overlaying boxes, circles, arrows, text, etc?

  • ShawnCastrianni.5092ShawnCastrianni.5092 Shawn Castrianni US ✭✭✭

    @mattleibow Can you request from Microsoft that SkiaSharp get its own forum group under Graphics & Games? UrhoSharp and CocosSharp have their own. SkiaSharp should have its own too.

  • mattleibowmattleibow Matthew Leibowitz ZAXamarin Team Xamurai

    @ShawnCastrianni.5092 It seems this is happening! Stay tuned to that category in the very near future :)

  • JoseMirallesJoseMiralles Jose Miralles USMember

    Is there anyway of displaying an already created SKBitmap or SKCanvas in a view?
    I just installed "SkiaSharp.Views" but I can't find a way of doing so.

  • mattleibowmattleibow Matthew Leibowitz ZAXamarin Team Xamurai
    edited February 23

    @JoseMiralles Right now there is no way to just set view.Bitmap = myBitmap. You will have to implement the paint event and draw the image yourself.

    I was thinking about this just a few hours ago, and I am looking at adding something like this in the coming release. I created an issue to track this: https://github.com/mono/SkiaSharp/issues/255

    Please feel free to leave comments or any suggestions that will help with meeting your needs.

    Link to your other post: https://forums.xamarin.com/discussion/comment/255068/#Comment_255068

  • JoseMirallesJoseMiralles Jose Miralles USMember

    @mattleibow That's really cool to hear, I'm looking forward to it.
    Since my app needs to have these images saved on solid state anyway, I'm just going to save them and then load them
    on a normal ImageView view for now.

  • QuakeulfQuakeulf Øyvind Sørøy NOMember ✭✭✭

    So does animated SVGs work in the SkiaSharps?

Sign In or Register to comment.