Skip to content

Version 1.49.3 (Beta)

Pre-release
Pre-release
Compare
Choose a tag to compare
@mattleibow mattleibow released this 14 May 17:42

Changes

  • NEW Windows UWP support
  • NEW Support for additional platforms (1)
  • NEW Support for SKCanvas clipping (2)
  • FIX Return types for SKCanvas 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.