Releases: mono/SkiaSharp
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 ();
}
Version 1.49.3 (Beta)
Changes
NEW
Windows UWP supportNEW
Support for additional platforms (1)NEW
Support forSKCanvas
clipping (2)FIX
Return types forSKCanvas
saving (3)FIX
Improved UTF-32/UTF-16/UTF-8 handling (4)
NuGet: https://www.nuget.org/packages/SkiaSharp/1.49.3-beta
Notes
Note 1
To better enable support for additional platforms not yet officially supported, such as Linux, we have a new feature that will prevent the inclusion of the default native library. To support a custom platform, first disable the native library by adding:
<ShouldIncludeNativeSkiaSharp>False</ShouldIncludeNativeSkiaSharp>
to the project that includes the native library (net45 library or exe). This will prevent the default library from being included, but then you will have to include your native library manually. The only criteria for this is to ensure that the native library is named libSkiaSharp
.
Note 2
The old SKCanvas.ClipRect
and SKCanvas.ClipPath
did not provide a means to reset the clip region. New methods were added for this:
void ClipRect(SKRect rect, SKRegionOperation operation = SKRegionOperation.Intersect, bool antialias = false);
void ClipPath(SKRect rect, SKRegionOperation operation = SKRegionOperation.Intersect, bool antialias = false);
bool GetClipBounds(ref SKRect bounds);
bool GetClipDeviceBounds(ref SKRectI bounds);
Note 3
SKCanvas.Save
and SKCanvas.SaveLayer
did not correctly return the value from native code.
Note 4
The original implementation of SKPaint.MeasureText
, SKPaint.BreakText
, SKPaint.GetTextPath
and SKPaint.GetPosTextPath
tried to convert the text to UTF-16 before performing the operation. The new implementation uses the encoding provided by the SKPaint
instance.
Just like when writing text to the screen, the SKPaint
uses the text encoding provided by the TextEncoding
property for all text operations.