diff --git a/VERSIONS.txt b/VERSIONS.txt index 5b29bff11d..2b5f6dbd07 100644 --- a/VERSIONS.txt +++ b/VERSIONS.txt @@ -1,6 +1,4 @@ # dependencies -ANGLE.WindowsStore release 2.1.13 -mdoc.targets release 5.7.4.10 mdoc release 5.7.4.10 harfbuzz release 2.6.1 skia release m68 @@ -12,13 +10,14 @@ Xamarin.Forms.Platform.GTK release 4.4.0.991757 Tizen.NET release 4.0.0 OpenTK release 3.0.1 OpenTK.GLControl release 3.0.1 -MSBuild.Sdk.Extras release 1.6.65 +MSBuild.Sdk.Extras release 2.0.54 Cake release 0.37.0 GtkSharp release 3.22.24.37 GdkSharp release 3.22.24.37 GLibSharp release 3.22.24.37 AtkSharp release 3.22.24.37 System.Memory release 4.5.3 +System.IO.UnmanagedMemoryStream release 4.3.0 # additional references used by the tooling OpenTK.GLControl reference 1.1.2349.61993 @@ -33,7 +32,7 @@ SkiaSharp file 1.68.2.0 # HarfBuzzSharp.dll HarfBuzzSharp assembly 1.0.0.0 -HarfBuzzSharp file 2.6.1.1 +HarfBuzzSharp file 2.6.1.2 # nuget versions SkiaSharp nuget 1.68.2 @@ -50,5 +49,5 @@ SkiaSharp.Views.Forms nuget 1.68.2 SkiaSharp.Views.Forms.WPF nuget 1.68.2 SkiaSharp.Views.Forms.GTK nuget 1.68.2 SkiaSharp.HarfBuzz nuget 1.68.2 -HarfBuzzSharp nuget 2.6.1.1 -HarfBuzzSharp.NativeAssets.Linux nuget 2.6.1.1 +HarfBuzzSharp nuget 2.6.1.2 +HarfBuzzSharp.NativeAssets.Linux nuget 2.6.1.2 diff --git a/cake/UtilsManaged.cake b/cake/UtilsManaged.cake index 93754124b3..c37a55fe59 100644 --- a/cake/UtilsManaged.cake +++ b/cake/UtilsManaged.cake @@ -125,7 +125,7 @@ string[] GetReferenceSearchPaths() var refs = new List(); if (IsRunningOnWindows()) { - var vs = VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" }); + var vs = VS_INSTALL ?? VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" }); var referenceAssemblies = $"{vs}/Common7/IDE/ReferenceAssemblies/Microsoft/Framework"; var pf = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); diff --git a/changelogs/HarfBuzzSharp/2.6.1.2/HarfBuzzSharp.md b/changelogs/HarfBuzzSharp/2.6.1.2/HarfBuzzSharp.md new file mode 100644 index 0000000000..c043585d33 --- /dev/null +++ b/changelogs/HarfBuzzSharp/2.6.1.2/HarfBuzzSharp.md @@ -0,0 +1,5 @@ +# API diff: HarfBuzzSharp.dll + +## HarfBuzzSharp.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Desktop.Common/1.68.2/SkiaSharp.Views.Desktop.Common.md b/changelogs/SkiaSharp.Views.Desktop.Common/1.68.2/SkiaSharp.Views.Desktop.Common.md index 0feaabb146..9a263cf84a 100644 --- a/changelogs/SkiaSharp.Views.Desktop.Common/1.68.2/SkiaSharp.Views.Desktop.Common.md +++ b/changelogs/SkiaSharp.Views.Desktop.Common/1.68.2/SkiaSharp.Views.Desktop.Common.md @@ -2,4 +2,15 @@ ## SkiaSharp.Views.Desktop.Common.dll -> No changes. +### Namespace SkiaSharp.Views.Desktop + +#### Type Changed: SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + + diff --git a/changelogs/SkiaSharp.Views.Forms.GTK/1.68.2/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.GTK/1.68.2/SkiaSharp.Views.Forms.md index 16515e825f..b857aa206f 100644 --- a/changelogs/SkiaSharp.Views.Forms.GTK/1.68.2/SkiaSharp.Views.Forms.md +++ b/changelogs/SkiaSharp.Views.Forms.GTK/1.68.2/SkiaSharp.Views.Forms.md @@ -298,6 +298,7 @@ public class SKTouchEventArgs : System.EventArgs { public SKTouchEventArgs (long id, SKTouchAction type, SkiaSharp.SKPoint location, bool inContact); public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact); public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact, int wheelDelta); + public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact, int wheelDelta, float pressure); // properties public SKTouchAction ActionType { get; } public SKTouchDeviceType DeviceType { get; } @@ -306,6 +307,7 @@ public class SKTouchEventArgs : System.EventArgs { public bool InContact { get; } public SkiaSharp.SKPoint Location { get; } public SKMouseButton MouseButton { get; } + public float Pressure { get; } public int WheelDelta { get; } // methods public override string ToString (); diff --git a/changelogs/SkiaSharp.Views.Forms.WPF/1.68.2/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.WPF/1.68.2/SkiaSharp.Views.Forms.md index 2c761511b3..5c67c3aec8 100644 --- a/changelogs/SkiaSharp.Views.Forms.WPF/1.68.2/SkiaSharp.Views.Forms.md +++ b/changelogs/SkiaSharp.Views.Forms.WPF/1.68.2/SkiaSharp.Views.Forms.md @@ -13,6 +13,21 @@ ISKGLViewController ``` +#### Type Changed: SkiaSharp.Views.Forms.SKTouchEventArgs + +Added constructor: + +```csharp +public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact, int wheelDelta, float pressure); +``` + +Added property: + +```csharp +public float Pressure { get; } +``` + + #### New Type: SkiaSharp.Views.Forms.ISKGLViewController ```csharp diff --git a/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.breaking.md b/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.breaking.md new file mode 100644 index 0000000000..9004b32260 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.breaking.md @@ -0,0 +1,16 @@ +# API diff: SkiaSharp.Views.Forms.dll + +## SkiaSharp.Views.Forms.dll + +### Namespace SkiaSharp.Views.Forms + +#### Type Changed: SkiaSharp.Views.Forms.SKImageSourceHandler + +Removed method: + +```csharp +public virtual System.Threading.Tasks.Task LoadImageAsync (Xamarin.Forms.Platform.Tizen.Native.Image image, Xamarin.Forms.ImageSource imageSource, System.Threading.CancellationToken cancelationToken); +``` + + + diff --git a/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.md index 2c761511b3..5c67c3aec8 100644 --- a/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.md +++ b/changelogs/SkiaSharp.Views.Forms/1.68.2/SkiaSharp.Views.Forms.md @@ -13,6 +13,21 @@ ISKGLViewController ``` +#### Type Changed: SkiaSharp.Views.Forms.SKTouchEventArgs + +Added constructor: + +```csharp +public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact, int wheelDelta, float pressure); +``` + +Added property: + +```csharp +public float Pressure { get; } +``` + + #### New Type: SkiaSharp.Views.Forms.ISKGLViewController ```csharp diff --git a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Android.md b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Android.md index b0fda33e6c..3274f444b4 100644 --- a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Android.md +++ b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Android.md @@ -4,6 +4,15 @@ ### Namespace SkiaSharp.Views.Android +#### Type Changed: SkiaSharp.Views.Android.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + #### New Type: SkiaSharp.Views.Android.Resource ```csharp diff --git a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Mac.md b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Mac.md index e86f5ab45e..7f6a00947f 100644 --- a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Mac.md +++ b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Mac.md @@ -2,4 +2,24 @@ ## SkiaSharp.Views.Mac.dll -> No changes. +### Namespace SkiaSharp.Views.Mac + +#### Type Changed: SkiaSharp.Views.Mac.SKGLView + +Added method: + +```csharp +public override void Reshape (); +``` + + +#### Type Changed: SkiaSharp.Views.Mac.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + + diff --git a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Tizen.md b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Tizen.md index 576719cc50..f6eb4663d4 100644 --- a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Tizen.md +++ b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.Tizen.md @@ -2,4 +2,15 @@ ## SkiaSharp.Views.Tizen.dll -> No changes. +### Namespace SkiaSharp.Views.Tizen + +#### Type Changed: SkiaSharp.Views.Tizen.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + + diff --git a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.UWP.md b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.UWP.md index 65f4808e21..b5af2bb973 100644 --- a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.UWP.md +++ b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.UWP.md @@ -2,4 +2,33 @@ ## SkiaSharp.Views.UWP.dll -> No changes. +### Namespace SkiaSharp.Views.UWP + +#### Type Changed: SkiaSharp.Views.UWP.AngleSwapChainPanel + +Added method: + +```csharp +protected virtual void OnDestroyingContext (); +``` + + +#### Type Changed: SkiaSharp.Views.UWP.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + +#### Type Changed: SkiaSharp.Views.UWP.SKSwapChainPanel + +Added method: + +```csharp +protected override void OnDestroyingContext (); +``` + + + diff --git a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.iOS.md b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.iOS.md index a20ae9ea6a..de3bcb66fc 100644 --- a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.iOS.md +++ b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.iOS.md @@ -2,4 +2,15 @@ ## SkiaSharp.Views.iOS.dll -> No changes. +### Namespace SkiaSharp.Views.iOS + +#### Type Changed: SkiaSharp.Views.iOS.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + + diff --git a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.tvOS.md b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.tvOS.md index f8e47f50e2..12a5ac0aa8 100644 --- a/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.tvOS.md +++ b/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.tvOS.md @@ -2,4 +2,15 @@ ## SkiaSharp.Views.tvOS.dll -> No changes. +### Namespace SkiaSharp.Views.tvOS + +#### Type Changed: SkiaSharp.Views.tvOS.SKPaintGLSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + + + diff --git a/changelogs/SkiaSharp/1.68.1/SkiaSharp.humanreadable.md b/changelogs/SkiaSharp/1.68.1/SkiaSharp.humanreadable.md new file mode 100644 index 0000000000..9abbae9f48 --- /dev/null +++ b/changelogs/SkiaSharp/1.68.1/SkiaSharp.humanreadable.md @@ -0,0 +1,455 @@ +# API diff: SkiaSharp.dll + +## SkiaSharp.dll + +### Namespace SkiaSharp + +#### Type Changed: SkiaSharp.SKAbstractManagedStream + +Added methods: + +```csharp +protected virtual IntPtr OnDuplicate (); +protected virtual IntPtr OnFork (); +``` + + +#### Type Changed: SkiaSharp.SKBitmap + +Added methods: + +```csharp +public System.ReadOnlySpan GetPixelSpan (); +``` + + +#### Type Changed: SkiaSharp.SKCanvas + +Added methods: + +```csharp +public void Discard (); +public void DrawDrawable (SKDrawable drawable, ref SKMatrix matrix); +public void DrawDrawable (SKDrawable drawable, SKPoint p); +public void DrawDrawable (SKDrawable drawable, float x, float y); +``` + + +#### Type Changed: SkiaSharp.SKColorSpace + +Added properties: + +```csharp +public bool IsNumericalTransferFunction { get; } +public SKNamedGamma NamedGamma { get; } +public SKColorSpaceType Type { get; } +``` + +Obsoleted methods: + +```diff + [Obsolete ("Use CreateRgb (SKColorSpaceRenderTargetGamma, SKColorSpaceGamut) instead.")] + public static SKColorSpace CreateRgb (SKColorSpaceRenderTargetGamma gamma, SKColorSpaceGamut gamut, SKColorSpaceFlags flags); + [Obsolete ("Use CreateRgb (SKColorSpaceRenderTargetGamma, SKMatrix44) instead.")] + public static SKColorSpace CreateRgb (SKColorSpaceRenderTargetGamma gamma, SKMatrix44 toXyzD50, SKColorSpaceFlags flags); + [Obsolete ("Use CreateRgb (SKColorSpaceTransferFn, SKColorSpaceGamut) instead.")] + public static SKColorSpace CreateRgb (SKColorSpaceTransferFn coeffs, SKColorSpaceGamut gamut, SKColorSpaceFlags flags); + [Obsolete ("Use CreateRgb (SKColorSpaceTransferFn, SKMatrix44) instead.")] + public static SKColorSpace CreateRgb (SKColorSpaceTransferFn coeffs, SKMatrix44 toXyzD50, SKColorSpaceFlags flags); +``` + +Modified methods: + +```diff + public SKColorSpace CreateRgb (SKColorSpaceRenderTargetGamma gamma, SKColorSpaceGamut gamut, SKColorSpaceFlags flags--- = 0---) + public SKColorSpace CreateRgb (SKColorSpaceRenderTargetGamma gamma, SKMatrix44 toXyzD50, SKColorSpaceFlags flags--- = 0---) + public SKColorSpace CreateRgb (SKColorSpaceTransferFn coeffs, SKColorSpaceGamut gamut, SKColorSpaceFlags flags--- = 0---) + public SKColorSpace CreateRgb (SKColorSpaceTransferFn coeffs, SKMatrix44 toXyzD50, SKColorSpaceFlags flags--- = 0---) +``` + +Added methods: + +```csharp +public static SKColorSpace CreateRgb (SKColorSpaceRenderTargetGamma gamma, SKColorSpaceGamut gamut); +public static SKColorSpace CreateRgb (SKColorSpaceRenderTargetGamma gamma, SKMatrix44 toXyzD50); +public static SKColorSpace CreateRgb (SKColorSpaceTransferFn coeffs, SKColorSpaceGamut gamut); +public static SKColorSpace CreateRgb (SKColorSpaceTransferFn coeffs, SKMatrix44 toXyzD50); +public static SKColorSpace CreateRgb (SKNamedGamma gamma, SKColorSpaceGamut gamut); +public static SKColorSpace CreateRgb (SKNamedGamma gamma, SKMatrix44 toXyzD50); +public SKMatrix44 FromXyzD50 (); +public bool GetNumericalTransferFunction (out SKColorSpaceTransferFn fn); +``` + + +#### Type Changed: SkiaSharp.SKColorSpacePrimaries + +Added constructor: + +```csharp +public SKColorSpacePrimaries (float[] values); +``` + +Added property: + +```csharp +public float[] Values { get; } +``` + + +#### Type Changed: SkiaSharp.SKColorSpaceTransferFn + +Added constructor: + +```csharp +public SKColorSpaceTransferFn (float[] values); +``` + +Added property: + +```csharp +public float[] Values { get; } +``` + +Added method: + +```csharp +public float Transform (float x); +``` + + +#### Type Changed: SkiaSharp.SKData + +Added methods: + +```csharp +public System.ReadOnlySpan AsSpan (); +public static SKData CreateCopy (System.ReadOnlySpan bytes); +``` + + +#### Type Changed: SkiaSharp.SKEncodedImageFormat + +Added value: + +```csharp +Heif = 11, +``` + + +#### Type Changed: SkiaSharp.SKImage + +Added methods: + +```csharp +public SKImage ApplyImageFilter (SKImageFilter filter, SKRectI subset, SKRectI clipBounds, out SKRectI outSubset, out SKPointI outOffset); +public static SKImage FromEncodedData (System.ReadOnlySpan data); +public static SKImage FromPixelCopy (SKImageInfo info, System.ReadOnlySpan pixels); +public static SKImage FromPixelCopy (SKImageInfo info, System.ReadOnlySpan pixels, int rowBytes); +``` + + +#### Type Changed: SkiaSharp.SKManagedStream + +Added methods: + +```csharp +public int CopyTo (SKWStream destination); +protected override IntPtr OnDuplicate (); +protected override IntPtr OnFork (); +public SKStreamAsset ToMemoryStream (); +``` + + +#### Type Changed: SkiaSharp.SKMatrix + +Added constructor: + +```csharp +public SKMatrix (float scaleX, float skewX, float transX, float skewY, float scaleY, float transY, float persp0, float persp1, float persp2); +``` + + +#### Type Changed: SkiaSharp.SKNativeObject + +Added properties: + +```csharp +protected bool IgnorePublicDispose { get; set; } +protected bool IsDisposed { get; } +protected virtual bool OwnsHandle { get; set; } +``` + +Added methods: + +```csharp +protected void DisposeInternal (); +protected virtual void DisposeManaged (); +protected virtual void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKObject + +Removed property: + +```csharp +protected bool OwnsHandle { get; } +``` + + +#### Type Changed: SkiaSharp.SKPaint + +Added methods: + +```csharp +public long BreakText (IntPtr buffer, int length, float maxWidth); +public long BreakText (IntPtr buffer, int length, float maxWidth, out float measuredWidth); +public bool ContainsGlyphs (IntPtr text, IntPtr length); +public int CountGlyphs (IntPtr text, IntPtr length); +public float[] GetGlyphWidths (IntPtr text, IntPtr length); +public float[] GetGlyphWidths (IntPtr text, IntPtr length, out SKRect[] bounds); +public ushort[] GetGlyphs (IntPtr text, IntPtr length); +public float[] GetHorizontalTextIntercepts (IntPtr text, IntPtr length, float[] xpositions, float y, float upperBounds, float lowerBounds); +public float[] GetPositionedTextIntercepts (IntPtr text, IntPtr length, SKPoint[] positions, float upperBounds, float lowerBounds); +public float[] GetTextIntercepts (IntPtr text, IntPtr length, float x, float y, float upperBounds, float lowerBounds); +public SKPath GetTextPath (IntPtr buffer, int length, SKPoint[] points); +public SKPath GetTextPath (IntPtr buffer, int length, float x, float y); +public float MeasureText (IntPtr buffer, int length); +public float MeasureText (IntPtr buffer, int length, ref SKRect bounds); +public void Reset (); +``` + + +#### Type Changed: SkiaSharp.SKPictureRecorder + +Added methods: + +```csharp +public SKDrawable EndRecordingAsDrawable (); +``` + + +#### Type Changed: SkiaSharp.SKPixmap + +Added methods: + +```csharp +public System.ReadOnlySpan GetPixelSpan (); +``` + + +#### Type Changed: SkiaSharp.SKRegion + +Added constructors: + +```csharp +public SKRegion (SKPath path); +public SKRegion (SKRectI rect); +``` + +Added methods: + +```csharp +public bool Intersects (SKPath path); +public bool Op (SKPath path, SKRegionOperation op); +``` + + +#### Type Changed: SkiaSharp.SKRoundRect + +Added methods: + +```csharp +public bool TryTransform (SKMatrix matrix, out SKRoundRect transformed); +``` + + +#### Type Changed: SkiaSharp.SKShader + +Added methods: + +```csharp +public static SKShader CreateLinearGradient (SKPoint start, SKPoint end, SKColor[] colors, SKShaderTileMode mode); +public static SKShader CreatePicture (SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy); +public static SKShader CreatePicture (SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKRect tile); +public static SKShader CreatePicture (SKPicture src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix, SKRect tile); +public static SKShader CreateRadialGradient (SKPoint center, float radius, SKColor[] colors, SKShaderTileMode mode); +public static SKShader CreateSweepGradient (SKPoint center, SKColor[] colors); +public static SKShader CreateSweepGradient (SKPoint center, SKColor[] colors, SKShaderTileMode tileMode, float startAngle, float endAngle); +public static SKShader CreateTwoPointConicalGradient (SKPoint start, float startRadius, SKPoint end, float endRadius, SKColor[] colors, SKShaderTileMode mode); +``` + + +#### Type Changed: SkiaSharp.SKStream + +Added method: + +```csharp +public bool Move (int offset); +``` + + +#### Type Changed: SkiaSharp.SKSwizzle + +Added methods: + +```csharp +public static void SwapRedBlue (System.ReadOnlySpan pixels, int count); +public static void SwapRedBlue (System.ReadOnlySpan dest, System.ReadOnlySpan src, int count); +``` + + +#### Type Changed: SkiaSharp.SKTextBlobBuilder + +Modified methods: + +```diff +-public void AddHorizontalRun (SKPaint font, float y, ushort[] glyphs, float[] positions, byte[] utf8Text, uint[] clusters) ++public void AddHorizontalRun (SKPaint font, float y, ushort[] glyphs, float[] positions, byte[] text, uint[] clusters) +-public void AddHorizontalRun (SKPaint font, float y, ushort[] glyphs, float[] positions, byte[] utf8Text, uint[] clusters, SKRect bounds) ++public void AddHorizontalRun (SKPaint font, float y, ushort[] glyphs, float[] positions, byte[] text, uint[] clusters, SKRect bounds) +-public void AddPositionedRun (SKPaint font, ushort[] glyphs, SKPoint[] positions, byte[] utf8Text, uint[] clusters) ++public void AddPositionedRun (SKPaint font, ushort[] glyphs, SKPoint[] positions, byte[] text, uint[] clusters) +-public void AddPositionedRun (SKPaint font, ushort[] glyphs, SKPoint[] positions, byte[] utf8Text, uint[] clusters, SKRect bounds) ++public void AddPositionedRun (SKPaint font, ushort[] glyphs, SKPoint[] positions, byte[] text, uint[] clusters, SKRect bounds) +-public void AddRun (SKPaint font, float x, float y, ushort[] glyphs, byte[] utf8Text, uint[] clusters) ++public void AddRun (SKPaint font, float x, float y, ushort[] glyphs, byte[] text, uint[] clusters) +-public void AddRun (SKPaint font, float x, float y, ushort[] glyphs, byte[] utf8Text, uint[] clusters, SKRect bounds) ++public void AddRun (SKPaint font, float x, float y, ushort[] glyphs, byte[] text, uint[] clusters, SKRect bounds) +``` + +Added methods: + +```csharp +public void AddHorizontalRun (SKPaint font, float y, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions); +public void AddHorizontalRun (SKPaint font, float y, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions, SKRect? bounds); +public void AddHorizontalRun (SKPaint font, float y, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions, System.ReadOnlySpan text, System.ReadOnlySpan clusters); +public void AddHorizontalRun (SKPaint font, float y, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions, System.ReadOnlySpan text, System.ReadOnlySpan clusters, SKRect? bounds); +public void AddPositionedRun (SKPaint font, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions); +public void AddPositionedRun (SKPaint font, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions, SKRect? bounds); +public void AddPositionedRun (SKPaint font, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions, System.ReadOnlySpan text, System.ReadOnlySpan clusters); +public void AddPositionedRun (SKPaint font, System.ReadOnlySpan glyphs, System.ReadOnlySpan positions, System.ReadOnlySpan text, System.ReadOnlySpan clusters, SKRect? bounds); +public void AddRun (SKPaint font, float x, float y, System.ReadOnlySpan glyphs); +public void AddRun (SKPaint font, float x, float y, System.ReadOnlySpan glyphs, SKRect? bounds); +public void AddRun (SKPaint font, float x, float y, System.ReadOnlySpan glyphs, System.ReadOnlySpan text, System.ReadOnlySpan clusters); +public void AddRun (SKPaint font, float x, float y, System.ReadOnlySpan glyphs, System.ReadOnlySpan text, System.ReadOnlySpan clusters, SKRect? bounds); +public SKHorizontalRunBuffer AllocateHorizontalRun (SKPaint font, int count, float y); +public SKHorizontalRunBuffer AllocateHorizontalRun (SKPaint font, int count, float y, int textByteCount); +public SKHorizontalRunBuffer AllocateHorizontalRun (SKPaint font, int count, float y, SKRect? bounds); +public SKHorizontalRunBuffer AllocateHorizontalRun (SKPaint font, int count, float y, int textByteCount, SKRect? bounds); +public SKPositionedRunBuffer AllocatePositionedRun (SKPaint font, int count); +public SKPositionedRunBuffer AllocatePositionedRun (SKPaint font, int count, int textByteCount); +public SKPositionedRunBuffer AllocatePositionedRun (SKPaint font, int count, SKRect? bounds); +public SKPositionedRunBuffer AllocatePositionedRun (SKPaint font, int count, int textByteCount, SKRect? bounds); +public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y); +public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y, int textByteCount); +public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y, SKRect? bounds); +public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y, int textByteCount, SKRect? bounds); +``` + + +#### Type Changed: SkiaSharp.SKTypeface + +Added properties: + +```csharp +public bool IsBold { get; } +public bool IsFixedPitch { get; } +public bool IsItalic { get; } +public int TableCount { get; } +``` + +Added methods: + +```csharp +public int CountGlyphs (System.ReadOnlySpan str, SKEncoding encoding); +public ushort[] GetGlyphs (System.ReadOnlySpan text, SKEncoding encoding); +public int GetGlyphs (System.ReadOnlySpan text, SKEncoding encoding, out ushort[] glyphs); +public int GetTableSize (uint tag); +public bool TryGetTableData (uint tag, int offset, int length, IntPtr tableData); +public bool TryGetTableTags (out uint[] tags); +``` + + +#### New Type: SkiaSharp.SKColorSpaceType + +```csharp +[Serializable] +public enum SKColorSpaceType { + Cmyk = 1, + Gray = 2, + Rgb = 0, +} +``` + +#### New Type: SkiaSharp.SKDrawable + +```csharp +public class SKDrawable : SkiaSharp.SKObject, System.IDisposable { + // constructors + protected SKDrawable (); + protected SKDrawable (bool owns); + // properties + public SKRect Bounds { get; } + public uint GenerationId { get; } + // methods + public void Draw (SKCanvas canvas, ref SKMatrix matrix); + public void Draw (SKCanvas canvas, float x, float y); + public void NotifyDrawingChanged (); + protected virtual void OnDraw (SKCanvas canvas); + protected virtual SKRect OnGetBounds (); + protected virtual SKPicture OnSnapshot (); + public SKPicture Snapshot (); +} +``` + +#### New Type: SkiaSharp.SKHorizontalRunBuffer + +```csharp +public sealed class SKHorizontalRunBuffer : SkiaSharp.SKRunBuffer { + // methods + public System.Span GetPositionSpan (); + public void SetPositions (System.ReadOnlySpan positions); +} +``` + +#### New Type: SkiaSharp.SKNamedGamma + +```csharp +[Serializable] +public enum SKNamedGamma { + Linear = 0, + NonStandard = 3, + Srgb = 1, + TwoDotTwoCurve = 2, +} +``` + +#### New Type: SkiaSharp.SKPositionedRunBuffer + +```csharp +public sealed class SKPositionedRunBuffer : SkiaSharp.SKRunBuffer { + // methods + public System.Span GetPositionSpan (); + public void SetPositions (System.ReadOnlySpan positions); +} +``` + +#### New Type: SkiaSharp.SKRunBuffer + +```csharp +public class SKRunBuffer { + // properties + public int Size { get; } + public int TextSize { get; } + // methods + public System.Span GetClusterSpan (); + public System.Span GetGlyphSpan (); + public System.Span GetTextSpan (); + public void SetClusters (System.ReadOnlySpan clusters); + public void SetGlyphs (System.ReadOnlySpan glyphs); + public void SetText (System.ReadOnlySpan text); +} +``` + + diff --git a/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md b/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md new file mode 100644 index 0000000000..70dcd1d28b --- /dev/null +++ b/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md @@ -0,0 +1,545 @@ +# API diff: SkiaSharp.dll + +## SkiaSharp.dll + +### Namespace SkiaSharp + +#### Type Changed: SkiaSharp.GRBackendTextureDesc + +Added properties: + +```csharp +public SKRectI Rect { get; } +public SKSizeI Size { get; } +``` + + +#### Type Changed: SkiaSharp.GRGlBackendTextureDesc + +Added properties: + +```csharp +public SKRectI Rect { get; } +public SKSizeI Size { get; } +``` + + +#### Type Changed: SkiaSharp.GRGlTextureInfo + +Added constructor: + +```csharp +public GRGlTextureInfo (uint target, uint id); +``` + + +#### Type Changed: SkiaSharp.SKBitmap + +Added methods: + +```csharp +public static SKBitmap Decode (System.ReadOnlySpan buffer); +public static SKBitmap Decode (System.ReadOnlySpan buffer, SKImageInfo bitmapInfo); +public static SKImageInfo DecodeBounds (System.ReadOnlySpan buffer); +public SKData Encode (SKEncodedImageFormat format, int quality); +public bool Encode (System.IO.Stream dst, SKEncodedImageFormat format, int quality); +public SKBitmap Resize (SKSizeI size, SKFilterQuality quality); +public SKShader ToShader (); +public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy); +public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix); +``` + + +#### Type Changed: SkiaSharp.SKCanvas + +Added properties: + +```csharp +public bool IsClipEmpty { get; } +public bool IsClipRect { get; } +``` + +Added methods: + +```csharp +public void DrawArc (SKRect oval, float startAngle, float sweepAngle, bool useCenter, SKPaint paint); +public void DrawAtlas (SKImage atlas, SKRect[] sprites, SKRotationScaleMatrix[] transforms, SKPaint paint); +public void DrawAtlas (SKImage atlas, SKRect[] sprites, SKRotationScaleMatrix[] transforms, SKColor[] colors, SKBlendMode mode, SKPaint paint); +public void DrawAtlas (SKImage atlas, SKRect[] sprites, SKRotationScaleMatrix[] transforms, SKColor[] colors, SKBlendMode mode, SKRect cullRect, SKPaint paint); +public void DrawPatch (SKPoint[] cubics, SKColor[] colors, SKPoint[] texCoords, SKPaint paint); +public void DrawPatch (SKPoint[] cubics, SKColor[] colors, SKPoint[] texCoords, SKBlendMode mode, SKPaint paint); +public void DrawRoundRectDifference (SKRoundRect outer, SKRoundRect inner, SKPaint paint); +public int SaveLayer (); +``` + + +#### Type Changed: SkiaSharp.SKColorSpacePrimaries + +Added field: + +```csharp +public static SKColorSpacePrimaries Empty; +``` + + +#### Type Changed: SkiaSharp.SKColorSpaceTransferFn + +Added field: + +```csharp +public static SKColorSpaceTransferFn Empty; +``` + + +#### Type Changed: SkiaSharp.SKDynamicMemoryWStream + +Added methods: + +```csharp +public bool CopyTo (System.IO.Stream dst); +public void CopyTo (System.Span data); +``` + + +#### Type Changed: SkiaSharp.SKFontManager + +Added method: + +```csharp +public SKTypeface MatchFamily (string familyName); +``` + + +#### Type Changed: SkiaSharp.SKImage + +Obsoleted methods: + +```diff + [Obsolete ("Use FromPixels (SKImageInfo, SKData, int) instead.")] + public static SKImage FromPixelData (SKImageInfo info, SKData data, int rowBytes); +``` + +Added methods: + +```csharp +public static SKImage FromPixels (SKImageInfo info, SKData data); +public bool IsValid (GRContext context); +public bool ReadPixels (SKPixmap pixmap); +public bool ReadPixels (SKImageInfo dstInfo, IntPtr dstPixels); +public bool ReadPixels (SKImageInfo dstInfo, IntPtr dstPixels, int dstRowBytes); +public SKImage ToRasterImage (bool ensurePixelData); +public SKShader ToShader (); +public SKImage ToTextureImage (GRContext context); +public SKImage ToTextureImage (GRContext context, SKColorSpace colorspace); +``` + + +#### Type Changed: SkiaSharp.SKImageInfo + +Added methods: + +```csharp +public SKImageInfo WithSize (SKSizeI size); +``` + + +#### Type Changed: SkiaSharp.SKMask + +Added methods: + +```csharp +public static SKMask Create (System.ReadOnlySpan image, SKRectI bounds, uint rowBytes, SKMaskFormat format); +public System.Span GetImageSpan (); +``` + + +#### Type Changed: SkiaSharp.SKMatrix + +Added constructor: + +```csharp +public SKMatrix (float[] values); +``` + +Added fields: + +```csharp +public static SKMatrix Empty; +public static SKMatrix Identity; +``` + +Added properties: + +```csharp +public bool IsIdentity { get; } +public bool IsInvertible { get; } +``` + +Obsoleted methods: + +```diff + [Obsolete ("Use MapRect(SKRect) instead.")] + public static void MapRect (ref SKMatrix matrix, out SKRect dest, ref SKRect source); + [Obsolete ("Use PostConcat(SKMatrix) instead.")] + public static void PostConcat (ref SKMatrix target, SKMatrix matrix); + [Obsolete ("Use PostConcat(SKMatrix) instead.")] + public static void PostConcat (ref SKMatrix target, ref SKMatrix matrix); + [Obsolete ("Use PreConcat(SKMatrix) instead.")] + public static void PreConcat (ref SKMatrix target, SKMatrix matrix); + [Obsolete ("Use PreConcat(SKMatrix) instead.")] + public static void PreConcat (ref SKMatrix target, ref SKMatrix matrix); + [Obsolete ("Use CreateRotation(float) instead.")] + public static void Rotate (ref SKMatrix matrix, float radians); + [Obsolete ("Use CreateRotation(float, float, float) instead.")] + public static void Rotate (ref SKMatrix matrix, float radians, float pivotx, float pivoty); + [Obsolete ("Use CreateRotationDegrees(float) instead.")] + public static void RotateDegrees (ref SKMatrix matrix, float degrees); + [Obsolete ("Use CreateRotationDegrees(float, float, float) instead.")] + public static void RotateDegrees (ref SKMatrix matrix, float degrees, float pivotx, float pivoty); + [Obsolete ()] + public void SetScaleTranslate (float sx, float sy, float tx, float ty); +``` + +Added methods: + +```csharp +public static SKMatrix Concat (SKMatrix first, SKMatrix second); +public static SKMatrix CreateIdentity (); +public static SKMatrix CreateRotation (float radians); +public static SKMatrix CreateRotation (float radians, float pivotX, float pivotY); +public static SKMatrix CreateRotationDegrees (float degrees); +public static SKMatrix CreateRotationDegrees (float degrees, float pivotX, float pivotY); +public static SKMatrix CreateScale (float x, float y); +public static SKMatrix CreateScale (float x, float y, float pivotX, float pivotY); +public static SKMatrix CreateSkew (float x, float y); +public static SKMatrix CreateTranslation (float x, float y); +public SKMatrix Invert (); +public SKPoint MapVector (SKPoint vector); +public SKMatrix PostConcat (SKMatrix matrix); +public SKMatrix PreConcat (SKMatrix matrix); +``` + + +#### Type Changed: SkiaSharp.SKMatrix44 + +Added property: + +```csharp +public bool IsInvertible { get; } +``` + +Added methods: + +```csharp +public static SKMatrix44 CreateTranslation (float x, float y, float z); +public void Set3x3ColumnMajor (float[] src); +public void Set3x3RowMajor (float[] src); +public static SKMatrix44 op_Implicit (SKMatrix matrix); +``` + + +#### Type Changed: SkiaSharp.SKPath + +Added method: + +```csharp +public void Transform (SKMatrix matrix, SKPath destination); +``` + + +#### Type Changed: SkiaSharp.SKPathMeasure + +Added methods: + +```csharp +public SKMatrix GetMatrix (float distance, SKPathMeasureMatrixFlags flags); +public SKPoint GetPosition (float distance); +public SKPath GetSegment (float start, float stop, bool startWithMoveTo); +public SKPoint GetTangent (float distance); +public void SetPath (SKPath path); +``` + + +#### Type Changed: SkiaSharp.SKPicture + +Added methods: + +```csharp +public SKShader ToShader (); +public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy); +public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKRect tile); +public SKShader ToShader (SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix, SKRect tile); +``` + + +#### Type Changed: SkiaSharp.SKPixmap + +Obsoleted methods: + +```diff + [Obsolete ("Use Encode(SKWStream, SKJpegEncoderOptions) instead.")] + public static bool Encode (SKWStream dst, SKPixmap src, SKJpegEncoderOptions options); + [Obsolete ("Use Encode(SKWStream, SKPngEncoderOptions) instead.")] + public static bool Encode (SKWStream dst, SKPixmap src, SKPngEncoderOptions options); + [Obsolete ("Use Encode(SKWStream, SKWebpEncoderOptions) instead.")] + public static bool Encode (SKWStream dst, SKPixmap src, SKWebpEncoderOptions options); + [Obsolete ("Use Encode(SKWStream, SKEncodedImageFormat, int) instead.")] + public static bool Encode (SKWStream dst, SKBitmap src, SKEncodedImageFormat format, int quality); + [Obsolete ("Use Encode(SKWStream, SKEncodedImageFormat, int) instead.")] + public static bool Encode (SKWStream dst, SKPixmap src, SKEncodedImageFormat encoder, int quality); +``` + +Added methods: + +```csharp +public bool Encode (System.IO.Stream dst, SKJpegEncoderOptions options); +public bool Encode (System.IO.Stream dst, SKPngEncoderOptions options); +public bool Encode (System.IO.Stream dst, SKWebpEncoderOptions options); +public bool Encode (System.IO.Stream dst, SKEncodedImageFormat encoder, int quality); +public bool Erase (SKColorF color); +public bool Erase (SKColorF color, SKRectI subset); +public System.Span GetPixelSpan (); +``` + + +#### Type Changed: SkiaSharp.SKRegion + +Added properties: + +```csharp +public bool IsComplex { get; } +public bool IsEmpty { get; } +public bool IsRect { get; } +``` + +Added methods: + +```csharp +public bool Contains (SKPath path); +public bool Contains (SKRectI rect); +public SKRegion.ClipIterator CreateClipIterator (SKRectI clip); +public SKRegion.RectIterator CreateRectIterator (); +public SKRegion.SpanIterator CreateSpanIterator (int y, int left, int right); +public SKPath GetBoundaryPath (); +public bool QuickContains (SKRectI rect); +public bool QuickReject (SKPath path); +public bool QuickReject (SKRectI rect); +public bool QuickReject (SKRegion region); +public void SetEmpty (); +public bool SetRects (SKRectI[] rects); +public void Translate (int x, int y); +``` + + +#### Type Changed: SkiaSharp.SKRoundRect + +Added constructor: + +```csharp +public SKRoundRect (SKRect rect, float radius); +``` + + +#### Type Changed: SkiaSharp.SKShader + +Added methods: + +```csharp +public static SKShader CreateBitmap (SKBitmap src); +public static SKShader CreateColor (SKColorF color, SKColorSpace colorspace); +public static SKShader CreateImage (SKImage src); +public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy); +public static SKShader CreateImage (SKImage src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix localMatrix); +public static SKShader CreateLinearGradient (SKPoint start, SKPoint end, SKColorF[] colors, SKColorSpace colorspace, SKShaderTileMode mode); +public static SKShader CreateLinearGradient (SKPoint start, SKPoint end, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode mode); +public static SKShader CreateLinearGradient (SKPoint start, SKPoint end, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode mode, SKMatrix localMatrix); +public static SKShader CreatePerlinNoiseFractalNoise (float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, SKSizeI tileSize); +public static SKShader CreatePerlinNoiseImprovedNoise (float baseFrequencyX, float baseFrequencyY, int numOctaves, float z); +public static SKShader CreatePerlinNoiseTurbulence (float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, SKSizeI tileSize); +public static SKShader CreatePicture (SKPicture src); +public static SKShader CreateRadialGradient (SKPoint center, float radius, SKColorF[] colors, SKColorSpace colorspace, SKShaderTileMode mode); +public static SKShader CreateRadialGradient (SKPoint center, float radius, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode mode); +public static SKShader CreateRadialGradient (SKPoint center, float radius, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode mode, SKMatrix localMatrix); +public static SKShader CreateSweepGradient (SKPoint center, SKColorF[] colors, SKColorSpace colorspace); +public static SKShader CreateSweepGradient (SKPoint center, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos); +public static SKShader CreateSweepGradient (SKPoint center, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKMatrix localMatrix); +public static SKShader CreateSweepGradient (SKPoint center, SKColorF[] colors, SKColorSpace colorspace, SKShaderTileMode tileMode, float startAngle, float endAngle); +public static SKShader CreateSweepGradient (SKPoint center, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode tileMode, float startAngle, float endAngle); +public static SKShader CreateSweepGradient (SKPoint center, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode tileMode, float startAngle, float endAngle, SKMatrix localMatrix); +public static SKShader CreateTwoPointConicalGradient (SKPoint start, float startRadius, SKPoint end, float endRadius, SKColorF[] colors, SKColorSpace colorspace, SKShaderTileMode mode); +public static SKShader CreateTwoPointConicalGradient (SKPoint start, float startRadius, SKPoint end, float endRadius, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode mode); +public static SKShader CreateTwoPointConicalGradient (SKPoint start, float startRadius, SKPoint end, float endRadius, SKColorF[] colors, SKColorSpace colorspace, float[] colorPos, SKShaderTileMode mode, SKMatrix localMatrix); +public SKShader WithColorFilter (SKColorFilter filter); +public SKShader WithLocalMatrix (SKMatrix localMatrix); +``` + + +#### Type Changed: SkiaSharp.SKSvgCanvas + +Obsoleted methods: + +```diff + [Obsolete ("Use Create(SKRect, Stream) instead.")] + public static SKCanvas Create (SKRect bounds, SKXmlWriter writer); +``` + +Added methods: + +```csharp +public static SKCanvas Create (SKRect bounds, SKWStream stream); +public static SKCanvas Create (SKRect bounds, System.IO.Stream stream); +``` + + +#### Type Changed: SkiaSharp.SKSwizzle + +Added method: + +```csharp +public static void SwapRedBlue (System.Span pixels); +``` + + +#### Type Changed: SkiaSharp.SKTypeface + +Added property: + +```csharp +public int GlyphCount { get; } +``` + +Obsoleted methods: + +```diff + [Obsolete ("Use CountGlyphs(byte[], SKTextEncoding) instead.")] + public int CountGlyphs (byte[] str, SKEncoding encoding); + [Obsolete ("Use CountGlyphs(ReadOnlySpan, SKTextEncoding) instead.")] + public int CountGlyphs (System.ReadOnlySpan str, SKEncoding encoding); + [Obsolete ("Use CountGlyphs(string) instead.")] + public int CountGlyphs (string str, SKEncoding encoding); + [Obsolete ("Use CountGlyphs(ReadOnlySpan, SKTextEncoding) instead.")] + public int CountGlyphs (IntPtr str, int strLen, SKEncoding encoding); + [Obsolete ("Use GetGlyphs(ReadOnlySpan, SKTextEncoding) instead.")] + public ushort[] GetGlyphs (byte[] text, SKEncoding encoding); + [Obsolete ("Use GetGlyphs(ReadOnlySpan, SKTextEncoding) instead.")] + public ushort[] GetGlyphs (System.ReadOnlySpan text, SKEncoding encoding); + [Obsolete ("Use GetGlyphs(string) instead.")] + public ushort[] GetGlyphs (string text, SKEncoding encoding); + [Obsolete ("Use GetGlyphs(string) instead.")] + public int GetGlyphs (string text, out ushort[] glyphs); + [Obsolete ("Use GetGlyphs(byte[], SKTextEncoding) instead.")] + public int GetGlyphs (byte[] text, SKEncoding encoding, out ushort[] glyphs); + [Obsolete ("Use GetGlyphs(IntPtr, int, SKTextEncoding) instead.")] + public ushort[] GetGlyphs (IntPtr text, int length, SKEncoding encoding); + [Obsolete ("Use GetGlyphs(ReadOnlySpan, SKTextEncoding) instead.")] + public int GetGlyphs (System.ReadOnlySpan text, SKEncoding encoding, out ushort[] glyphs); + [Obsolete ("Use GetGlyphs(string) instead.")] + public int GetGlyphs (string text, SKEncoding encoding, out ushort[] glyphs); + [Obsolete ("Use GetGlyphs(IntPtr, int, SKTextEncoding) instead.")] + public int GetGlyphs (IntPtr text, int length, SKEncoding encoding, out ushort[] glyphs); +``` + +Added methods: + +```csharp +public bool ContainsGlyphs (System.ReadOnlySpan text); +public bool ContainsGlyphs (string text); +public bool ContainsGlyphs (System.ReadOnlySpan text, SKTextEncoding encoding); +public bool ContainsGlyphs (IntPtr text, int length, SKTextEncoding encoding); +public int CountGlyphs (System.ReadOnlySpan str); +public int CountGlyphs (byte[] str, SKTextEncoding encoding); +public int CountGlyphs (System.ReadOnlySpan str, SKTextEncoding encoding); +public int CountGlyphs (IntPtr str, int strLen, SKTextEncoding encoding); +public ushort[] GetGlyphs (System.ReadOnlySpan text); +public ushort[] GetGlyphs (System.ReadOnlySpan text, SKTextEncoding encoding); +public ushort[] GetGlyphs (IntPtr text, int length, SKTextEncoding encoding); +public int[] GetKerningPairAdjustments (System.ReadOnlySpan glyphs); +``` + + +#### Type Changed: SkiaSharp.SkiaExtensions + +Added methods: + +```csharp +public static SKAlphaType GetAlphaType (this SKColorType colorType, SKAlphaType alphaType); +public static int GetBytesPerPixel (this SKColorType colorType); +public static SKTextEncoding ToTextEncoding (this SKEncoding encoding); +``` + + +#### Type Changed: SkiaSharp.StringUtilities + +Obsoleted methods: + +```diff + [Obsolete ("Use GetEncodedText(string, SKTextEncoding) instead.")] + public static byte[] GetEncodedText (string text, SKEncoding encoding); +``` + +Added methods: + +```csharp +public static byte[] GetEncodedText (System.ReadOnlySpan text, SKTextEncoding encoding); +public static string GetString (System.ReadOnlySpan data, SKTextEncoding encoding); +public static string GetString (System.ReadOnlySpan data, int index, int count, SKTextEncoding encoding); +``` + + +#### New Type: SkiaSharp.SKColorF + +```csharp +public struct SKColorF { + // constructors + public SKColorF (float red, float green, float blue); + public SKColorF (float red, float green, float blue, float alpha); + // fields + public static SKColorF Empty; + // properties + public float Alpha { get; } + public float Blue { get; } + public float Green { get; } + public float Hue { get; } + public float Red { get; } + // methods + public SKColorF Clamp (); + public static SKColorF FromHsl (float h, float s, float l, float a); + public static SKColorF FromHsv (float h, float s, float v, float a); + public void ToHsl (out float h, out float s, out float l); + public void ToHsv (out float h, out float s, out float v); + public SKColorF WithAlpha (float alpha); + public SKColorF WithBlue (float blue); + public SKColorF WithGreen (float green); + public SKColorF WithRed (float red); + public static SKColor op_Explicit (SKColorF color); + public static SKColorF op_Implicit (SKColor color); +} +``` + +#### New Type: SkiaSharp.SKRotationScaleMatrix + +```csharp +public struct SKRotationScaleMatrix { + // constructors + public SKRotationScaleMatrix (float scos, float ssin, float tx, float ty); + // fields + public static SKRotationScaleMatrix Empty; + public static SKRotationScaleMatrix Identity; + // properties + public float SCos { get; set; } + public float SSin { get; set; } + public float TX { get; set; } + public float TY { get; set; } + // methods + public static SKRotationScaleMatrix Create (float scale, float radians, float tx, float ty, float anchorX, float anchorY); + public static SKRotationScaleMatrix CreateDegrees (float scale, float degrees, float tx, float ty, float anchorX, float anchorY); + public static SKRotationScaleMatrix CreateIdentity (); + public static SKRotationScaleMatrix CreateRotation (float radians, float anchorX, float anchorY); + public static SKRotationScaleMatrix CreateRotationDegrees (float degrees, float anchorX, float anchorY); + public static SKRotationScaleMatrix CreateScale (float s); + public static SKRotationScaleMatrix CreateTranslation (float x, float y); + public SKMatrix ToMatrix (); +} +``` + + diff --git a/changelogs/SkiaSharp/1.68.2/SkiaSharp.md b/changelogs/SkiaSharp/1.68.2/SkiaSharp.md index 1c7ca2184e..8156d99714 100644 --- a/changelogs/SkiaSharp/1.68.2/SkiaSharp.md +++ b/changelogs/SkiaSharp/1.68.2/SkiaSharp.md @@ -291,6 +291,15 @@ public void CopyTo (System.Span data); ``` +#### Type Changed: SkiaSharp.SKFontManager + +Added method: + +```csharp +public SKTypeface MatchFamily (string familyName); +``` + + #### Type Changed: SkiaSharp.SKFontMetrics Added interface: @@ -528,6 +537,16 @@ public static SKMatrix44 op_Implicit (SKMatrix matrix); ``` +#### Type Changed: SkiaSharp.SKNativeObject + +Modified methods: + +```diff +-protected void DisposeInternal () ++protected void DisposeInternal () +``` + + #### Type Changed: SkiaSharp.SKPMColor Added interface: @@ -597,12 +616,14 @@ Obsoleted methods: Added methods: ```csharp +protected override void DisposeManaged (); public bool Encode (System.IO.Stream dst, SKJpegEncoderOptions options); public bool Encode (System.IO.Stream dst, SKPngEncoderOptions options); public bool Encode (System.IO.Stream dst, SKWebpEncoderOptions options); public bool Encode (System.IO.Stream dst, SKEncodedImageFormat encoder, int quality); public bool Erase (SKColorF color); public bool Erase (SKColorF color, SKRectI subset); +public System.Span GetPixelSpan (); ``` @@ -1021,6 +1042,8 @@ public struct SKRotationScaleMatrix, System.IEquatable { public float TX { get; set; } public float TY { get; set; } // methods + public static SKRotationScaleMatrix Create (float scale, float radians, float tx, float ty, float anchorX, float anchorY); + public static SKRotationScaleMatrix CreateDegrees (float scale, float degrees, float tx, float ty, float anchorX, float anchorY); public static SKRotationScaleMatrix CreateIdentity (); public static SKRotationScaleMatrix CreateRotation (float radians, float anchorX, float anchorY); public static SKRotationScaleMatrix CreateRotationDegrees (float degrees, float anchorX, float anchorY); @@ -1028,8 +1051,6 @@ public struct SKRotationScaleMatrix, System.IEquatable { public static SKRotationScaleMatrix CreateTranslation (float x, float y); public virtual bool Equals (SKRotationScaleMatrix obj); public override bool Equals (object obj); - public static SKRotationScaleMatrix FromDegrees (float scale, float degrees, float tx, float ty, float anchorX, float anchorY); - public static SKRotationScaleMatrix FromRadians (float scale, float radians, float tx, float ty, float anchorX, float anchorY); public override int GetHashCode (); public SKMatrix ToMatrix (); public static bool op_Equality (SKRotationScaleMatrix left, SKRotationScaleMatrix right); diff --git a/docs b/docs index 644c51e87f..d5a1e7347c 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 644c51e87f1dc8abc5f0583726de29572eb75419 +Subproject commit d5a1e7347ca1de56da619ebf268719c81bf2e768