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
Bot releases are hidden (Show)
Published by mattleibow over 7 years ago
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.
SKColorSpace
CreateColorCube
and CreateGamma
are no longer available on SKColorFilter
CreateHighContrast
is now available on SKColorFilter
SKImageFilter
and SKPathEffect
typesNuGet: https://www.nuget.org/packages/SkiaSharp/1.58.0
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.57.1...v1.58.0
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
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
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
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
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
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
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.
Published by mattleibow over 7 years ago
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.
SKTypeface
now has support for opening a stream to the underlying font dataNuGet: https://www.nuget.org/packages/SkiaSharp/1.57.1
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.57.0...v1.57.1
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.1
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.57.1
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
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
HarfBuzz is a text shaping engine, and HarfBuzzSharp exposes some of the functionality to managed .NET applications.
Blob
, Buffer
, Face
and Font
NuGet: https://www.nuget.org/packages/HarfBuzzSharp/1.4.5
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.
SKShaper
type for shaping textDrawShapedText
extension method to SKCanvas
ToHarfBuzzBlob
extension method to SKStreamAsset
(seekable streams)NuGet: https://www.nuget.org/packages/SkiaSharp.HarfBuzz/1.57.1-beta
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.
Published by mattleibow over 7 years ago
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.
SKBitmap
can now be encoded directly using Encode
SKCanvas
can now draw a SKSurface
directlySKData
can now be created without existing data / uninitializedSKDocument
can now create XPS documents (Windows-only)
SK3dView
is now obsolete. Use SKMatrix44
insteadSKPixmap
can now also encode the pixel data directly using Encode
overloadsSKSurface
has members to access the pixel data directlySKMaskFilter
and shadow SKMaskFilter
are no longer availableSKEncodedFormat
and SKImageEncodeFormat
are now SKEncodedImageFormat
[Obsolete]
members are now errorsNuGet: https://www.nuget.org/packages/SkiaSharp/1.57.0
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.2...v1.57.0
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
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 casesNuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.57.0
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
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:
SKGeometry
CreateSectorPath
will create a pie/donut shape as would be used in a pie/donut chartCreatePiePath
will create a pie/donut chart from a series of offset valuesNuGet: https://www.nuget.org/packages/SkiaSharp.Extended/1.57.0-beta
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.
Published by mattleibow over 7 years ago
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 transformationsSKFrontBufferedStream
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 colorsSKData
has several overloads for creating instances either as a copy or a wrapperSKImage
now has lots more members for constructing pixel-backed and texture-backed imagesSKImage
also has useful methods, such as ReadPixels
, PeekPixels
, ScalePixelsand
ApplyImageFilter`GRContext
can now reset internal state using the ResetContext
methodSKBitmap
can now decode non-seekable streams using the new SKFrontBufferedStream
SKCanvas
now has the DrawVertices
methodSKStream
now have overloads for .NET Stream
typesSKColorTable
is now correctly using premultiplied colors (SKPMColor
), and will premultiply SKColor
automaticallyNuGet: https://www.nuget.org/packages/SkiaSharp/1.56.2
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.1...v1.56.2
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.
SKBitmap
, SKImage
, SKPixmap
, SKPicture
WriteableBitmap
, Android and Desktop Bitmap
, iOS/tvOS UIImage
, Apple CGImage
and CIImage
, macOS NSImage
SKData
and NSData
SKXamlCanvas
NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.56.2
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.
ImageSource
types that can be used to directly draw a SkiaSharp imageNuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.56.2
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.
NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.56.2
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.
Published by mattleibow over 7 years ago
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.
SKFontManager
for finding typefaces for a specific character (#232)SKSvgCanvas
(preview) (#107)SKMask
(#220)SK3dView
(creating 3D SKMatrix
transformations) (#214)SKPath
, such as AddPoly
and SegmentMasks
SKBitmap
, such as ExtractAlpha
and ExtractSubset
StringUtilities
SKMaskFilter
SKCodec
now supports scanline decodingSKDocument
now supports metadata and annotationsSKBitmap
can be created from a SKMask
SKStrokeJoin.Mitter
to SKStrokeJoin.Miter
(#227)SKImageInfo.PlatformColorType
now correctly obtains the platform color typeNuGet: https://www.nuget.org/packages/SkiaSharp/1.56.1
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.56.0...v1.56.1
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
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
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.
NuGet: https://www.nuget.org/packages/SkiaSharp.Svg/1.56.1
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.
Published by mattleibow over 7 years ago
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.
SKSvgCanvas
(preview)
SKMask
SK3dView
(creating 3D SKMatrix
transformations)SKDocument
now supports metadata and annotationsSKBitmap
can be created from a SKMask
SKStrokeJoin.Mitter
to SKStrokeJoin.Miter
SKImageInfo.PlatformColorType
now correctly obtains the platform color typeNuGet: 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
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
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
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
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.
Published by mattleibow almost 8 years ago
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.
SKBitmap
SKBitmap.Resize
SKBitmap.InstallPixels
and SKBitmap.PeekPixels
SKPixmap
SKCodec
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
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.
SKXamlCanvas
for UWP no longer blocks on Invalidate()
NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.56.0
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 SKGLViewRenderer
is now transparent by defaultNuGet: https://www.nuget.org/packages/SkiaSharp.Views.Forms/1.56.0
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.0-beta1
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.
Published by mattleibow almost 8 years ago
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.
SKBitmap
Index8
color type (thanks to @Tylerflick)SKCanvas
QuickReject
to do a check before drawingSKCodec
GRBackendRenderTargetDesc
has convenience members Size
and Rect
SKColorTable
has an indexer to get the colorsSKData
can be used as a stream, which handles the lifetime of the dataNuGet: https://www.nuget.org/packages/SkiaSharp/1.55.1
Code Diff: https://github.com/mono/SkiaSharp/compare/v1.55.0...v1.55.1
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.55.1
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.1
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.55.1-beta1
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.
Published by mattleibow almost 8 years ago
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.
chrome/m55
SKColor.Parse
and SKColor.TryParse
SKCanvas
, such as SKRegion
SKPaint.GetFillPath()
to create a new path using the fill propertiesSKPath
SKPathMeasure
for measuring and segmenting pathsSKTypeface
propertiesSKRect*
, SKSize*
and SKPoint*
SKMatrix
GRGlInterface
on UWPGRContext.Flush(GRContextFlushBits)
is now obsolete. Use GRContext.Flush()
.SKDocument.Close()
no longer returns bool
. Returns void
.SKPaint.XferMode
is now obsolete. Use SKPaint.BlendMode
.NuGet: https://www.nuget.org/packages/SkiaSharp/1.55.0
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.
<some-view>.CanvasSize
which can be used to calculate scaling/pixel density:var scaling = view.CanvasSize.Width / view.Width;
SkiaSharp.Views.<platform-name>
NuGet: https://www.nuget.org/packages/SkiaSharp.Views/1.55.0
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
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.
Published by mattleibow about 8 years ago
Any CPU
<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 arrayGRGlInterface
improvements
NEW
Added support for creating an ANGLE interfaceNEW
Improved the assembly of a GL interfaceNuGet: 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.
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
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.
Published by mattleibow about 8 years ago
NEW
All the latest from Google's chrome/m54 releaseNEW
GPU backend support for SKSurface
(1)NEW
Multiple new members for basic structs, such as SKRect
, SKPoint
, SKColor
, etcNEW
New "gamma" SKColorFilter
typeNEW
Support for drawing image lattices, such as a 9-patchNEW
Additional members for SKPath
CHANGE
The various structs now no longer are field-based, but rather have get/set propertiesNuGet: https://www.nuget.org/packages/SkiaSharp/1.54.0
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
.
Published by mattleibow about 8 years ago
NEW
All the changes from v1.53.1.2
NEW
Support for creating a SKCanvas
that writes to an XML stream (1)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
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();
Published by mattleibow about 8 years ago
NEW
All the changes from v1.53.1.2
NEW
Creating a GlInterface
from any GL library using AssembleGlInterface
(1)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
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.
Published by mattleibow about 8 years ago
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 layerPublished by mattleibow about 8 years ago
NEW
OpenGL supportAt 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
Published by mattleibow about 8 years ago
SKPaint.IsStroke
has no effect)Published by mattleibow about 8 years ago
NEW
Breaking Change: SkiaSharp.dll is now a strong name assemblyNEW
SKColorTable
NEW
SKBitmap
now has support for SKColorTable
NEW
SKCodec
now has support for SKColorTable
Several issues were closed, either fixed or resolved some other way.
Published by mattleibow about 8 years ago
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
and SKMatrix
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 with SKImageInfo.PlatformColorType
(2)REMOVED
SKImageDecoder
(1)FIX
Corrected many memory issuesNuGet: https://www.nuget.org/packages/SkiaSharp/1.53.0
The SKImageDecoder
type is now replaced with SKCodec
, which .
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.
The SKPath
type now includes several additional members to aid path creation: ArcTo
, RArcTo
, Rewind
, Reset
, AddPath
, AddRoundedRect
and AddCircle
.
Published by mattleibow over 8 years ago
NEW
Apple tvOS supportNEW
Support for PDF creation (1)NuGet: https://www.nuget.org/packages/SkiaSharp/1.49.4-beta
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 ();
}
Published by mattleibow over 8 years ago
NEW
Windows UWP supportNEW
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
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
.
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);
SKCanvas.Save
and SKCanvas.SaveLayer
did not correctly return the value from native code.
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.