Version 1.57.0
SkiaSharp
A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
- ⭐️ Major upgrade from m56 to m57 of the native skia library
SKBitmap
can now be encoded directly usingEncode
SKCanvas
can now draw aSKSurface
directlySKData
can now be created without existing data / uninitializedSKDocument
can now create XPS documents (Windows-only)- ❗️ There is a known issue with XPS on Windows 10 Mobile: see issue
SK3dView
is now obsolete. UseSKMatrix44
insteadSKPixmap
can now also encode the pixel data directly usingEncode
overloadsSKSurface
has members to access the pixel data directly- ❗️ The emboss
SKMaskFilter
and shadowSKMaskFilter
are no longer available - ❗️
SKEncodedFormat
andSKImageEncodeFormat
are nowSKEncodedImageFormat
- ❗️ Using
[Obsolete]
members are now errors - Resolved AOT errors on Android
- Many other bug fixes and additional features
NuGet: https://www.nuget.org/packages/SkiaSharp/1.57.0
Code Diff: v1.56.2...v1.57.0
SkiaSharp.Views
A set of pre-prepared UI views, panels and surfaces for drawing. One of these views can be added to the view hierarchy, 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.
NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.57.0
SkiaSharp.Views.Forms
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.
SKCanvasView
andSKGLView
now correctly resizes in some cases
NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.57.0
SkiaSharp.Svg (preview)
Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming too soon. However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.
This goes in part with SKSvgCanvas
, which is used to create SVG files. Although both are still "preview" areas because not all the features of SVG have been implemented yet, they are both still very usable for most cases.
NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.57.0
SkiaSharp.Extended (preview)
During the process of development and support, we have collected some cool functions that may be useful to some apps. We decided to release these an a package so that everyone can find use for them. This is a very small collection right now, but we hope to extend this with many more features.
We hope you will give them a go and suggest any additional features or utilities that may come in handy. What we have so far is:
- Initial work for
SKGeometry
CreateSectorPath
will create a pie/donut shape as would be used in a pie/donut chartCreatePiePath
will create a pie/donut chart from a series of offset values- Various other methods to create regular shape paths
NuGet: https://www.nuget.org/packages/SkiaSharp.Extended/1.57.0-beta
Samples
A few new samples were added to demonstrate some new features.
All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.