SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

MIT License

Stars
4.1K
Committers
91

Bot releases are hidden (Show)

SkiaSharp - Version 1.58.0

Published by mattleibow over 7 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • Update to the latest stable version of skia (chrome/m58)
  • Added bindings for SKColorSpace
  • CreateColorCube and CreateGamma are no longer available on SKColorFilter
  • CreateHighContrast is now available on SKColorFilter
  • A few more SKImageFilter and SKPathEffect types
  • Images are now always decoded as premultiplied alpha
  • Improvements for Linux consumers
  • General bug fixes and improvements

NuGet: https://www.nuget.org/packages/SkiaSharp/1.58.0
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.57.1...v1.58.0

SkiaSharp.Views

A set of pre-prepared UI views, panels and surfaces for drawing. One of these views can be added to the view hierarchy, 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.

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.58.0

SkiaSharp.Views.Forms

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, UWP and macOS (preview).

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.58.0

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming too soon. However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

This goes in part with SKSvgCanvas, which is used to create SVG files. Although both are still "preview" areas because not all the features of SVG have been implemented yet, they are both still very usable for most cases.

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.58.0

SkiaSharp.Extended (preview)

During the process of development and support, we have collected some cool functions that may be useful to some apps. We decided to release these an a package so that everyone can find use for them. This is a very small collection right now, but we hope to extend this with many more features.

We hope you will give them a go and suggest any additional features or utilities that may come in handy.

NuGet: https://www.nuget.org/packages/SkiaSharp.Extended/1.58.0-beta

HarfBuzzSharp (preview)

HarfBuzz is a text shaping engine, and HarfBuzzSharp exposes some of the functionality to managed .NET applications.

NuGet: https://www.nuget.org/packages/HarfBuzzSharp/1.4.6

SkiaSharp.HarfBuzz (preview)

Support for text shaping using the HarfBuzz text shaping library. This package adds the SKShaper type that can shape a string, returning the codepoints and their positions.

This package also adds some extension methods to SKCanvas to make drawing shaped text easier. These methods include DrawShapedText and it's overloads.

NuGet: https://www.nuget.org/packages/SkiaSharp.HarfBuzz/1.58.0-beta

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.57.1

Published by mattleibow over 7 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • Fixed issue with non-antialiased text on a scaled canvas on Windows
  • SKTypeface now has support for opening a stream to the underlying font data
  • Fixed an issue with publishing a .NET Core app to Windows 10
  • Installing the NuGet now requires NuGet v3.5+ for UWP apps
  • Improvements for Xamarin Workbooks
  • Improvements for macOS packaging

NuGet: https://www.nuget.org/packages/SkiaSharp/1.57.1
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.57.0...v1.57.1

SkiaSharp.Views

A set of pre-prepared UI views, panels and surfaces for drawing. One of these views can be added to the view hierarchy, 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.

  • Improved the designer detection support when native assets aren't available

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.57.1

SkiaSharp.Views.Forms

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, UWP and macOS (preview).

  • Initial support for Xamarin.Mac (preview)
  • Reworked the renderers making extension and customization far easier and simpler
  • The Xamarin.Forms Previewer no longer crashes when adding SkiaSharp views
  • Fixed an issue with the renderers adding multiple native views when in a list view item

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.57.1

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming too soon. However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

This goes in part with SKSvgCanvas, which is used to create SVG files. Although both are still "preview" areas because not all the features of SVG have been implemented yet, they are both still very usable for most cases.

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.57.1

SkiaSharp.Extended (preview)

During the process of development and support, we have collected some cool functions that may be useful to some apps. We decided to release these an a package so that everyone can find use for them. This is a very small collection right now, but we hope to extend this with many more features.

We hope you will give them a go and suggest any additional features or utilities that may come in handy.

NuGet: https://www.nuget.org/packages/SkiaSharp.Extended/1.57.1-beta

HarfBuzzSharp (preview)

HarfBuzz is a text shaping engine, and HarfBuzzSharp exposes some of the functionality to managed .NET applications.

  • Initial bindings for Blob, Buffer, Face and Font

NuGet: https://www.nuget.org/packages/HarfBuzzSharp/1.4.5

SkiaSharp.HarfBuzz (preview)

Support for text shaping using the HarfBuzz text shaping library. This package adds the SKShaper type that can shape a string, returning the codepoints and their positions.

This package also adds some extension methods to SKCanvas to make drawing shaped text easier. These methods include DrawShapedText and it's overloads.

  • Added a SKShaper type for shaping text
  • Added a DrawShapedText extension method to SKCanvas
  • Added a ToHarfBuzzBlob extension method to SKStreamAsset (seekable streams)

NuGet: https://www.nuget.org/packages/SkiaSharp.HarfBuzz/1.57.1-beta

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.57.0

Published by mattleibow over 7 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • ⭐️ Major upgrade from m56 to m57 of the native skia library
  • SKBitmap can now be encoded directly using Encode
  • SKCanvas can now draw a SKSurface directly
  • SKData can now be created without existing data / uninitialized
  • SKDocument can now create XPS documents (Windows-only)
    • ❗️ There is a known issue with XPS on Windows 10 Mobile: see issue
  • SK3dView is now obsolete. Use SKMatrix44 instead
  • SKPixmap can now also encode the pixel data directly using Encode overloads
  • SKSurface has members to access the pixel data directly
  • ❗️ The emboss SKMaskFilter and shadow SKMaskFilter are no longer available
  • ❗️ SKEncodedFormat and SKImageEncodeFormat are now SKEncodedImageFormat
  • ❗️ Using [Obsolete] members are now errors
  • Resolved AOT errors on Android
  • Many other bug fixes and additional features

NuGet: https://www.nuget.org/packages/SkiaSharp/1.57.0
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.2...v1.57.0

SkiaSharp.Views

A set of pre-prepared UI views, panels and surfaces for drawing. One of these views can be added to the view hierarchy, 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.

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.57.0

SkiaSharp.Views.Forms

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.

  • SKCanvasView and SKGLView now correctly resizes in some cases

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.57.0

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming too soon. However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

This goes in part with SKSvgCanvas, which is used to create SVG files. Although both are still "preview" areas because not all the features of SVG have been implemented yet, they are both still very usable for most cases.

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.57.0

SkiaSharp.Extended (preview)

During the process of development and support, we have collected some cool functions that may be useful to some apps. We decided to release these an a package so that everyone can find use for them. This is a very small collection right now, but we hope to extend this with many more features.

We hope you will give them a go and suggest any additional features or utilities that may come in handy. What we have so far is:

  • Initial work for SKGeometry
    • CreateSectorPath will create a pie/donut shape as would be used in a pie/donut chart
    • CreatePiePath will create a pie/donut chart from a series of offset values
    • Various other methods to create regular shape paths

NuGet: https://www.nuget.org/packages/SkiaSharp.Extended/1.57.0-beta

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.56.2

Published by mattleibow over 7 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • SKMatrix44 represents 3D transformations
  • SKFrontBufferedStream can be used to wrap non-seebable streams when decoding bitmaps with SKCodec
  • SKPMColor represents premultiplied colors and can be used for premultiplying and unpremultiplying colors
  • SKData has several overloads for creating instances either as a copy or a wrapper
  • SKImage now has lots more members for constructing pixel-backed and texture-backed images
  • SKImage also has useful methods, such as ReadPixels, PeekPixels, ScalePixelsandApplyImageFilter`
  • GRContext can now reset internal state using the ResetContext method
  • SKBitmap can now decode non-seekable streams using the new SKFrontBufferedStream
  • SKCanvas now has the DrawVertices method
  • Many of the types that accepted a SKStream now have overloads for .NET Stream types
  • Installing the SkiaSharp NuGet into unit test projects, or class libraries will result in the correct native libraries being copied to the bin directory
  • Fixed a bug with the underlying skia referencing and returning the same instance, but SkiaSharp didn't respect that. (It disposed of the instance)
  • Moved some more of the nested enumerations out into the root
  • ❗️ SKColorTable is now correctly using premultiplied colors (SKPMColor), and will premultiply SKColor automatically
  • Many other bug fixes and additional features

NuGet: https://www.nuget.org/packages/SkiaSharp/1.56.2
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.1...v1.56.2

SkiaSharp.Views

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.

  • There are now several extension methods for converting between SkiaSharp and native image formats
    • To/from SKBitmap, SKImage, SKPixmap, SKPicture
    • To/from UWP/WPF WriteableBitmap, Android and Desktop Bitmap, iOS/tvOS UIImage, Apple CGImage and CIImage, macOS NSImage
  • New extension methods for converting between SKData and NSData
  • Major performance improvements to the UWP SKXamlCanvas

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.56.2

SkiaSharp.Views.Forms

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.

  • There are several SkiaSharp ImageSource types that can be used to directly draw a SkiaSharp image

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.56.2

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming soon (or at all). However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

This goes in part with SKSvgCanvas, which is used to create SVG files. Although both are still "preview" areas because not all the features of SVG have been implemented yet, they are both still very usable for most cases.

  • More improvements for viewbox handling

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.56.2

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.56.1

Published by mattleibow over 7 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • New & Improved Platforms
    • Support for .NET Standard 1.3 project types (#111)
    • Support for .NET Core (win7, win10, osx) (#111)
    • Reduced native library sizes to ~5MB per platform architecture (#174)
    • Partial work to get a .NET Core Linux build. (#90)
  • Added Types
    • ★ Added support for SKFontManager for finding typefaces for a specific character (#232)
    • Added support for the SKSvgCanvas (preview) (#107)
    • Added support for SKMask (#220)
    • Added support for SK3dView (creating 3D SKMatrix transformations) (#214)
  • Other API Additions
    • ★ Many new members for SKPath, such as AddPoly and SegmentMasks
    • ★ Many new members for SKBitmap, such as ExtractAlpha and ExtractSubset
    • ★ Improved support for Unicode, UTF-32, emojis (#232)
    • ★ Some string helpers in StringUtilities
    • ★ Class library builds (ie: tests) for .NET 4.5 will now copy the native assembly to the output (#44, #190)
    • ★ Support for high quality blurring with SKMaskFilter
    • SKCodec now supports scanline decoding
    • PDF SKDocument now supports metadata and annotations
    • SKBitmap can be created from a SKMask
    • Changed SKStrokeJoin.Mitter to SKStrokeJoin.Miter (#227)
    • SKImageInfo.PlatformColorType now correctly obtains the platform color type

NuGet: https://www.nuget.org/packages/SkiaSharp/1.56.1
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.0...v1.56.1

SkiaSharp.Views

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.

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.56.1

SkiaSharp.Views.Forms

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.56.1

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming soon (or at all). However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

This goes in part with SKSvgCanvas, which is used to create SVG files. Although both are still "preview" areas because not all the features of SVG have been implemented yet, they are both still very usable for most cases.

  • ★ Fixes the handling of the viewbox (#230)

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.56.1

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.56.1 (beta)

Published by mattleibow over 7 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • New & Improved Platforms
    • Support for .NET Standard 1.3 project types
    • Support for .NET Core (win7, win10, osx)
    • Reduced native library sizes to ~5MB per platform architecture (#174)
    • Partial work to get a .NET Core Linux build. (#90)
  • Added Types
    • Added support for the SKSvgCanvas (preview)
    • Added support for SKMask
    • Added support for SK3dView (creating 3D SKMatrix transformations)
  • Other API Additions
    • PDF SKDocument now supports metadata and annotations
    • SKBitmap can be created from a SKMask
    • Changed SKStrokeJoin.Mitter to SKStrokeJoin.Miter
    • SKImageInfo.PlatformColorType now correctly obtains the platform color type

NuGet: https://www.nuget.org/packages/SkiaSharp/1.56.1-beta
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.0...v1.56.1-beta

SkiaSharp.Views

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.

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.56.1-beta

SkiaSharp.Views.Forms

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.56.1-beta

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming soon (or at all). However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.56.1-beta

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.56.0

Published by mattleibow almost 8 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • Improvements to SKBitmap
    • Resizing bitmaps using SKBitmap.Resize
    • Updating pixels directly using SKBitmap.InstallPixels and SKBitmap.PeekPixels
    • Bindings for SKPixmap
  • Improvements to SKCodec
    • Support for multi-frame images (such as .gif)
    • Support for reading the encoding information of a bitmap file
  • Other improvements
    • SKXfermode has been deprecated in favour of SKBlendMode
    • SKPicture.Bounds is now, more correctly, SKPicture.CullRect

NuGet: https://www.nuget.org/packages/SkiaSharp/1.56.0
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.55.1...v1.56.0

SkiaSharp.Views

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.

  • Fix for Android GL views to correctly clear the stencil buffer
  • Added a stencil buffer for macOS GL views
  • No longer dependent on OpenTK for Android/iOS/tvOS/macOS GL views
  • SKXamlCanvas for UWP no longer blocks on Invalidate()

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.56.0

SkiaSharp.Views.Forms

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.

  • No longer dependent on OpenTK for Android/iOS/tvOS/macOS GL views
  • iOS SKCanvasView and SKGLViewRenderer is now transparent by default

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.56.0

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming soon (or at all). However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

  • Correctly handling SVG transparency and opacity

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.56.0-beta1

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.55.1

Published by mattleibow almost 8 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • Improvements to SKBitmap
    • Decoded as a specific format (size/scale, color type)
    • Pixels can now be replaced in a variety of ways
    • Better support for the Index8 color type (thanks to @Tylerflick)
  • Improvements to SKCanvas
    • QuickReject to do a check before drawing
  • Improvements to SKCodec
    • Now supports incremental decoding
  • Other improvements
    • GRBackendRenderTargetDesc has convenience members Size and Rect
    • SKColorTable has an indexer to get the colors
    • SKData can be used as a stream, which handles the lifetime of the data
    • Fixed SkiaSharp for Windows Mobile emulator and Xbox One

NuGet: https://www.nuget.org/packages/SkiaSharp/1.55.1
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.55.0...v1.55.1

SkiaSharp.Views

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.

  • All raster-based views now have an option to ignore device scaling

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.55.1

SkiaSharp.Views.Forms

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.

  • All raster-based views now have an option to ignore device scaling

NuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.55.1

SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming soon (or at all). However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser.

  • An SVG can be loaded onto a canvas of a pre-defined size:
    • Completely ignore the drawing size in the SVG file (not scaled)
    • In case the SVG file does not have a size set

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.55.1-beta1

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.55.0

Published by mattleibow almost 8 years ago

SkiaSharp

A cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • Updated to the latest version of Google's Skia: chrome/m55
  • Many new features and improvements:
    • Improved exceptions for invalid/incorrect arguments
    • Added parsing HTML hex colors: SKColor.Parse and SKColor.TryParse
    • Added more clipping options for SKCanvas, such as SKRegion
    • Added SKPaint.GetFillPath() to create a new path using the fill properties
    • Added numerous overloads and members to SKPath
    • Added SKPathMeasure for measuring and segmenting paths
    • Added getters for SKTypeface properties
    • Additional members and overloads for SKRect*, SKSize* and SKPoint*
    • Additional overloads for SKMatrix
    • Improved image lattice drawing
    • Improved the internals for GRGlInterface on UWP
  • Changes from Google's Skia:
    • GRContext.Flush(GRContextFlushBits) is now obsolete. Use GRContext.Flush().
    • SKDocument.Close() no longer returns bool. Returns void.
    • SKPaint.XferMode is now obsolete. Use SKPaint.BlendMode.
  • Documentation:
    • Added thousands of docs, over the entire SkiaSharp API

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

SkiaSharp.Views

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.

  • A few small improvements
  • Added <some-view>.CanvasSize which can be used to calculate scaling/pixel density:
    var scaling = view.CanvasSize.Width / view.Width;
  • The namespace is now in the format SkiaSharp.Views.<platform-name>

NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.55.0

SkiaSharp.Views.Forms

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.55.0

NEW SkiaSharp.Svg (preview)

Support for SVG has been a hot topic, but Google has stated that this is not going to be a feature coming soon (or at all). However, we do want to support SVG. To this end, we are trying out a lightweight SVG parser. This is a pure managed code parser, that actually lives in a single file.

This implementation of SVG is very limited, but supports all the features supported by the alternate NGraphics library. We are looking to add new features, so please do create issues when you need a feature that does not exist yet.

Another SVG library that has recently had SkiaSharp support added is SVG by @gentledepp. If you need more features than what we have, please create an issue, but remember you can also try this library out as well.

NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.55.0-beta1

Samples

A few new samples were added to demonstrate some new features.

All the samples that have been built and tested for this version of SkiaSharp can be downloaded in the "Downloads" links below.

SkiaSharp - Version 1.54.1

Published by mattleibow about 8 years ago

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.

SkiaSharp - Version 1.54.0

Published by mattleibow about 8 years ago

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.

SkiaSharp - Version 1.53.2 (SVG Beta 1)

Published by mattleibow about 8 years ago

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();
SkiaSharp - Version 1.53.2 (GPU Beta 2)

Published by mattleibow about 8 years ago

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.

SkiaSharp - Version 1.53.1.2

Published by mattleibow about 8 years ago

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

SkiaSharp - Version 1.53.2 (GPU Beta 1)

Published by mattleibow about 8 years ago

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

SkiaSharp - Version 1.53.1.1

Published by mattleibow about 8 years ago

Changes

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

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

SkiaSharp - Version 1.53.1

Published by mattleibow about 8 years ago

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

SkiaSharp - Version 1.53.0

Published by mattleibow about 8 years ago

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.

SkiaSharp - Version 1.49.4 (Beta)

Published by mattleibow over 8 years ago

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

SkiaSharp - Version 1.49.3 (Beta)

Published by mattleibow over 8 years ago

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.