Skip to content

Releases: mono/SkiaSharp

Version 1.54.1

12 Oct 02:47
Compare
Choose a tag to compare

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 updates
    • NEW Now property based breaking change
    • NEW Support for reading/writing as a flat array
  • GRGlInterface improvements
    • NEW Added support for creating an ANGLE interface
    • NEW Improved the assembly of a GL interface
  • Massive size reduction for Windows/UWP native binaries

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

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 ();
}