Releases: mono/SkiaSharp
Version 1.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
updatesNEW
Now property basedbreaking change
NEW
Support for reading/writing as a flat array
GRGlInterface
improvementsNEW
Added support for creating an ANGLE interfaceNEW
Improved the assembly of a GL interface
- Massive size reduction for Windows/UWP native binaries
- Thanks to @xoofx for finding
- Fix in PR mono/skia#25 or commit mono/skia@a85cb36
- Reduction from >15MB per platform architecture to <5MB
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.
Version 1.54.0
Changes
NEW
All the latest from Google's chrome/m54 releaseNEW
GPU backend support forSKSurface
(1)NEW
Multiple new members for basic structs, such asSKRect
,SKPoint
,SKColor
, etcNEW
New "gamma"SKColorFilter
typeNEW
Support for drawing image lattices, such as a 9-patchNEW
Additional members forSKPath
CHANGE
The various structs now no longer are field-based, but rather have get/set properties
Notes
NuGet: https://www.nuget.org/packages/SkiaSharp/1.54.0
Note 1
At this time, all the platforms should have OpenGL support, except for UWP, which does not have OpenGL. UWP will soon be getting hardware acceleration through DirectX and ANGLE.
In addition to "normal" OpenGL interface, a GlInterface
can be "assembled" from any library, which provides an OpenGL-like API (such as ANGLE), using AssembleGlInterface
or AssembleGlesInterface
.
Version 1.53.2 (SVG Beta 1)
Changes
NEW
All the changes from v1.53.1.2NEW
Support for creating aSKCanvas
that writes to an XML stream (1)
Notes
At this time, not much testing has been done, and the API is subject to change. Additionally, writing to the SKSvgCanvas
is only partially implemented. Not all the features supported by Skia is supported by the SVG canvas. In the case where something is not working properly, please leave a comment on issue #107, but note that we may not be able to do much other than to recommend that you file an issue on Skia's issue tracker: https://bugs.skia.org
Leave comments/suggestions on #107
NuGet: https://www.nuget.org/packages/SkiaSharp/1.53.2-svg1
Note 1
A SKSvgCanvas
can be created on the fly, requiring only a bounds and an SKXmlWriter
:
// create a writeable stream
// SKFileWStream skStream = ...
// SKDynamicMemoryWStream skStream = ...
System.IO.Stream stream = ...
SkiaSharp.SKManagedWStream skStream = new SKManagedWStream(stream);
// now create the xml writer and the canvas
using (var writer = new SKXmlStreamWriter(skStream))
using (var canvas = SKSvgCanvas.Create(SKRect.Create(0, 0, (int)Bounds.Width, (int)Bounds.Height), writer))
{
// draw as normal since "canvas" is just a "SKCanvas"
}
// you may have to:
//skStream.Flush();
Version 1.53.2 (GPU Beta 2)
Changes
NEW
All the changes from v1.53.1.2NEW
Creating aGlInterface
from any GL library usingAssembleGlInterface
(1)
Notes
At this time, not much testing has been done, and the API is subject to change. All the platforms should have OpenGL support, except for UWP, which does not have OpenGL. UWP will soon be getting hardware acceleration through DirectX and ANGLE.
Leave comments/suggestions on #138
NuGet: https://www.nuget.org/packages/SkiaSharp/1.53.2-gpu2
Note 1
A GlInterface
can be "assembled" using AssembleGlInterface
or AssembleGlesInterface
.
var openGLES = ObjCRuntime.Dlfcn.dlopen("/System/Library/Frameworks/OpenGLES.framework/OpenGLES", 0);
var glInterface = GRGlInterface.AssembleGlesInterface((ctx, name) => {
return ObjCRuntime.Dlfcn.dlsym(openGLES, name);
});
Which is similar to what GrGLCreateNativeInterface()
does under the hood.
The value which is returned inside the delegate/callback is the pointer to the function that was requested using the name
parameter. In this case, we do a lookup in the GL library.
Version 1.53.1.2
Changes
NEW
Support for creating aSKCanvas
from aSKBitmap
NEW
Additional members forSKPaint
NEW
Additional members forSKPath
FIX
Resolves #129 (Violates Windows Store App Certification)FIX
A few fixes the the C/C# interop layer
Version 1.53.2 (GPU Beta 1)
Changes
NEW
OpenGL support
Notes
At this time, not much testing has been done, and the API is subject to change. All the platforms should have OpenGL support, except for UWP, which does not have OpenGL. UWP will soon be getting hardware acceleration through DirectX and ANGLE.
Leave comments/suggestions on #138
Version 1.53.1.1
Changes
- Resolves #135 (Setting
SKPaint.IsStroke
has no effect)
Version 1.53.1
Changes
NEW
Breaking Change: SkiaSharp.dll is now a strong name assemblyNEW
SKColorTable
NEW
SKBitmap
now has support forSKColorTable
NEW
SKCodec
now has support forSKColorTable
- Fixed a few bugs
- Lots more docs
- Added a WPF sample
Issues
Several issues were closed, either fixed or resolved some other way.
Version 1.53.0
Changes
NEW
SKPathEffect
NEW
SKPath
now has additional members (3)NEW
SKPath
can now be iterated overNEW
SKCodec
(1)NEW
SkiaSharp can now load Adobe DNG image formatsNEW
SKPoint
andSKMatrix
now have many more membersNEW
SKCanvas
now has transformations using a center pointNEW
SKCanvas
can now draw additional shapesNEW
SKTypeface
can now be created with additional optionsCHANGED
SKColorType.N_32
is now replaced withSKImageInfo.PlatformColorType
(2)REMOVED
SKImageDecoder
(1)FIX
Corrected many memory issues
NuGet: https://www.nuget.org/packages/SkiaSharp/1.53.0
Notes
Note 1
The SKImageDecoder
type is now replaced with SKCodec
, which .
Note 2
The platform-specific SKColorType
is no longer part of the enum, but as a static property on the SKImageInfo
type. This is to reduce confusion because the platform-specific value was not actually a separate value.
Note 3
The SKPath
type now includes several additional members to aid path creation: ArcTo
, RArcTo
, Rewind
, Reset
, AddPath
, AddRoundedRect
and AddCircle
.
Version 1.49.4 (Beta)
Changes
NEW
Apple tvOS supportNEW
Support for PDF creation (1)
NuGet: https://www.nuget.org/packages/SkiaSharp/1.49.4-beta
Notes
Note 1
A PDF file can be created using a SKDocument
and then by drawing using the normal drawing methods:
using (var stream = new SKFileWStream ("document.pdf"))
using (var document = SKDocument.CreatePdf (stream)) {
// the first page
using (var canvas = document.BeginPage (width, height))
using (var paint = new SKPaint ()) {
canvas.DrawText ("...PDF...", 10f, 100f, paint);
document.EndPage ();
}
// the second page
using (var canvas = document.BeginPage (width, height))
using (var paint = new SKPaint ()) {
canvas.DrawText ("...PDF...", 10f, 100f, paint);
document.EndPage ();
}
// all done
document.Close ();
}