Skip to content

Releases: mono/SkiaSharp

Version 1.54.0

05 Sep 15:14
Compare
Choose a tag to compare

Changes

  • NEW All the latest from Google's chrome/m54 release
  • NEW GPU backend support for SKSurface (1)
  • NEW Multiple new members for basic structs, such as SKRect, SKPoint, SKColor, etc
  • NEW New "gamma" SKColorFilter type
  • NEW Support for drawing image lattices, such as a 9-patch
  • NEW Additional members for SKPath
  • 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)

25 Aug 13:25
Compare
Choose a tag to compare
Pre-release

Changes

  • NEW All the changes from v1.53.1.2
  • NEW Support for creating a SKCanvas 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)

24 Aug 17:08
Compare
Choose a tag to compare
Pre-release

Changes

  • NEW All the changes from v1.53.1.2
  • NEW Creating a GlInterface from any GL library using AssembleGlInterface (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

24 Aug 14:31
Compare
Choose a tag to compare

Changes

  • NEW Support for creating a SKCanvas from a SKBitmap
  • NEW Additional members for SKPaint
  • NEW Additional members for SKPath
  • FIX Resolves #129 (Violates Windows Store App Certification)
  • FIX A few fixes the the C/C# interop layer

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

Version 1.53.2 (GPU Beta 1)

19 Aug 04:57
Compare
Choose a tag to compare
Pre-release

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

NuGet: https://www.nuget.org/packages/SkiaSharp/1.53.2-gpu1

Version 1.53.1.1

17 Aug 20:21
Compare
Choose a tag to compare

Changes

  • Resolves #135 (Setting SKPaint.IsStroke has no effect)

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

Version 1.53.1

16 Aug 14:32
Compare
Choose a tag to compare

Changes

  • NEW Breaking Change: SkiaSharp.dll is now a strong name assembly
  • NEW SKColorTable
  • NEW SKBitmap now has support for SKColorTable
  • NEW SKCodec now has support for SKColorTable
  • Fixed a few bugs
  • Lots more docs
  • Added a WPF sample

Issues

Several issues were closed, either fixed or resolved some other way.

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

Version 1.53.0

01 Aug 16:16
Compare
Choose a tag to compare

Changes

  • NEW SKPathEffect
  • NEW SKPath now has additional members (3)
  • NEW SKPath can now be iterated over
  • NEW SKCodec (1)
  • NEW SkiaSharp can now load Adobe DNG image formats
  • NEW SKPoint and SKMatrix now have many more members
  • NEW SKCanvas now has transformations using a center point
  • NEW SKCanvas can now draw additional shapes
  • NEW SKTypeface can now be created with additional options
  • CHANGED SKColorType.N_32 is now replaced with SKImageInfo.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)

15 Jun 16:39
Compare
Choose a tag to compare
Version 1.49.4 (Beta) Pre-release
Pre-release

Changes

  • NEW Apple tvOS support
  • NEW 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)

14 May 17:42
Compare
Choose a tag to compare
Version 1.49.3 (Beta) Pre-release
Pre-release

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.