### Install SkiaSharp NuGet Package Source: https://github.com/mono/skiasharp/blob/main/README.md This command demonstrates how to install the main SkiaSharp NuGet package using the NuGet command-line interface. This is the standard method to integrate SkiaSharp's 2D graphics capabilities into your .NET projects, providing access to its comprehensive API for rendering images. ```NuGet CLI nuget install SkiaSharp ``` -------------------------------- ### GNU LGPL 2.1 License Notice Template for Libraries Source: https://github.com/mono/skiasharp/blob/main/External-Dependency-Info.txt This template provides the standard GNU Lesser General Public License (LGPL) version 2.1 notice. It should be attached to the start of each source file of a new library to convey the terms of redistribution, modification, and the exclusion of warranty. It also directs users to the full license text. ```Text Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ``` -------------------------------- ### Added SKPictureRecorder.BeginRecording Method Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md A new `BeginRecording` overload has been added to `SKPictureRecorder`. This method allows starting a recording session with a specified culling rectangle and an option to use an R-tree for optimization, providing more control over the recording process. ```csharp public SKCanvas BeginRecording (SKRect cullRect, bool useRTree); ``` -------------------------------- ### HarfBuzzSharp.Feature Constructors Source: https://github.com/mono/skiasharp/blob/main/changelogs/HarfBuzzSharp/2.6.1/HarfBuzzSharp.md New constructors for the HarfBuzzSharp.Feature class, allowing initialization with different combinations of tag, value, start, and end parameters. ```csharp public Feature (Tag tag); public Feature (Tag tag, uint value); public Feature (Tag tag, uint value, uint start, uint end); ``` -------------------------------- ### Example Output of api-tools Compatibility Check Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.humanreadable.md This XML snippet shows a typical output from the `api-tools compat` command, listing types and members that are missing or have changed between the compared assemblies. It helps developers identify specific API usages that need updating. ```xml ``` -------------------------------- ### New SkiaExtensions Helper Methods Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Introduces new static extension methods in `SkiaSharp.SkiaExtensions` for `SKColorType` (to get alpha type and bytes per pixel) and `SKEncoding` (to convert to `SKTextEncoding`). ```APIDOC public static SKAlphaType GetAlphaType (this SKColorType colorType, SKAlphaType alphaType); public static int GetBytesPerPixel (this SKColorType colorType); public static SKTextEncoding ToTextEncoding (this SKEncoding encoding); ``` -------------------------------- ### Loading Android Font Assets Automatically in C# Source: https://github.com/mono/skiasharp/blob/main/samples/Basic/UnoPlatform/SkiaSharpSample/Platforms/Android/Assets/AboutAssets.txt This C# example shows how certain Android functions, like `Typeface.CreateFromAsset`, can directly load asset files (e.g., a font file 'fonts/samplefont.ttf') without explicit `AssetManager` calls. This simplifies loading common asset types like fonts. ```C# Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); ``` -------------------------------- ### Obsolete GRContext Creation and Resource Cache Limit Methods Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/2.80.0/SkiaSharp.md Documents the deprecation of several GRContext static Create methods that accept GRBackend and GRGlInterface parameters. Additionally, methods for getting and setting resource cache limits using 'out' parameters are now obsolete, indicating a shift to new API patterns. ```csharp [Obsolete ()] public static GRContext Create (GRBackend backend); [Obsolete ()] public static GRContext Create (GRBackend backend, GRGlInterface backendContext); [Obsolete ()] public void GetResourceCacheLimits (out int maxResources, out long maxResourceBytes); [Obsolete ()] public void SetResourceCacheLimits (int maxResources, long maxResourceBytes); ``` -------------------------------- ### New Type: SkiaSharp.Views.Maui.Controls.AppHostBuilderExtensions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.Maui.Controls/2.88.0/SkiaSharp.Views.Maui.Controls.md Documents a new static class providing extension methods for `Microsoft.Maui.Hosting.MauiAppBuilder` to enable SkiaSharp handlers within a .NET MAUI application. This simplifies the setup process for integrating SkiaSharp views. ```csharp public static class AppHostBuilderExtensions { // methods [Obsolete] public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharpHandlers (this Microsoft.Maui.Hosting.MauiAppBuilder builder); } ``` ```APIDOC class AppHostBuilderExtensions (static) methods: UseSkiaSharpHandlers(builder: Microsoft.Maui.Hosting.MauiAppBuilder): Microsoft.Maui.Hosting.MauiAppBuilder [Obsolete] Configures the MauiAppBuilder to use SkiaSharp handlers. ``` -------------------------------- ### Add GRContext Vulkan Creation and Single Resource Cache Limit Methods Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/2.80.0/SkiaSharp.md Documents the addition of new GRContext methods, including CreateVulkan for creating a context with a Vulkan backend. New methods for getting and setting a single resource cache limit have also been introduced, simplifying resource management. ```csharp public static GRContext CreateVulkan (GRVkBackendContext backendContext); public long GetResourceCacheLimit (); public void SetResourceCacheLimit (long maxResourceBytes); ``` -------------------------------- ### SKBitmap Type Changes Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.56.0/SkiaSharp.md Documents new methods added to the `SkiaSharp.SKBitmap` class, providing functionality for pixel installation, peeking, and resizing with various methods. ```csharp public bool InstallPixels (SKPixmap pixmap); public SKPixmap PeekPixels (); public bool Resize (SKBitmap dst, SKBitmapResizeMethod method); public SKBitmap Resize (SKImageInfo info, SKBitmapResizeMethod method); public static bool Resize (SKBitmap dst, SKBitmap src, SKBitmapResizeMethod method); ``` -------------------------------- ### SkiaSharp.SKBitmap Class API Changes Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md Covers obsoleted constructors and properties, and new methods added to the SKBitmap class, reflecting updates to bitmap creation, pixel installation, and resizing functionalities. ```diff [Obsolete ()] public SKBitmap (SKImageInfo info, SKColorTable ctable); [Obsolete ()] public SKBitmap (SKImageInfo info, SKColorTable ctable, SKBitmapAllocFlags flags); ``` ```csharp public SKBitmap (SKImageInfo info, SKBitmapAllocFlags flags); ``` ```diff [Obsolete ()] public SKColorTable ColorTable { get; } ``` ```diff [Obsolete ()] public SKPMColor GetIndex8Color (int x, int y); [Obsolete ()] public bool InstallPixels (SKImageInfo info, IntPtr pixels, int rowBytes, SKColorTable ctable); [Obsolete ()] public bool InstallPixels (SKImageInfo info, IntPtr pixels, int rowBytes, SKColorTable ctable, SKBitmapReleaseDelegate releaseProc, object context); [Obsolete ()] public bool Resize (SKBitmap dst, SKBitmapResizeMethod method); [Obsolete ()] public SKBitmap Resize (SKImageInfo info, SKBitmapResizeMethod method); [Obsolete ()] public static bool Resize (SKBitmap dst, SKBitmap src, SKBitmapResizeMethod method); [Obsolete ()] public void SetColorTable (SKColorTable ct); [Obsolete ()] public void SetPixels (IntPtr pixels, SKColorTable ct); ``` ```csharp public bool InstallPixels (SKImageInfo info, IntPtr pixels, int rowBytes, SKBitmapReleaseDelegate releaseProc); public bool InstallPixels (SKImageInfo info, IntPtr pixels, int rowBytes, SKBitmapReleaseDelegate releaseProc, object context); public SKBitmap Resize (SKImageInfo info, SKFilterQuality quality); public bool ScalePixels (SKBitmap destination, SKFilterQuality quality); public bool ScalePixels (SKPixmap destination, SKFilterQuality quality); public bool TryAllocPixels (SKImageInfo info); public bool TryAllocPixels (SKImageInfo info, SKBitmapAllocFlags flags); public bool TryAllocPixels (SKImageInfo info, int rowBytes); ``` -------------------------------- ### Loading Typeface from Android Assets in C# Source: https://github.com/mono/skiasharp/blob/main/samples/Gallery/Uno.WinUI/SkiaSharpSample.Mobile/Android/Assets/AboutAssets.txt This C# example shows how to load a custom font (Typeface) directly from the Android assets folder. The Typeface.CreateFromAsset() method simplifies the process, automatically accessing the specified font file located within the 'fonts' subdirectory of the assets. ```C# Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); ``` -------------------------------- ### Example of Generated Android R Class in C# Source: https://github.com/mono/skiasharp/blob/main/samples/Basic/UnoPlatform/SkiaSharpSample/Platforms/Android/Resources/AboutResources.txt Shows a C# representation of the automatically generated 'R' class. This class contains constant integer IDs for each resource, allowing programmatic access to resources like images, layouts, and strings without directly referencing filenames. ```C# public class R { public class drawable { public const int icon = 0x123; } public class layout { public const int main = 0x456; } public class strings { public const int first_string = 0xabc; public const int second_string = 0xbcd; } } ``` -------------------------------- ### Creating GPU Surface with Old SkiaSharp API Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/gpu-migration.md This C# code snippet demonstrates the deprecated method of creating a hardware-accelerated GPU surface in SkiaSharp prior to v1.68.0. It shows the setup of the OpenGL context and the use of the `GRBackendRenderTargetDesc` structure for defining the render target. ```csharp // create the GPU context (UNCHANGED) var glInterface = GRGlInterface.CreateNativeGlInterface(); var context = GRContext.Create(GRBackend.OpenGL, glInterface); // create the surface (OLD) var renderTarget = new GRBackendRenderTargetDesc { Width = 1024, Height = 1024, Config = GRPixelConfig.Rgba8888, Origin = GRSurfaceOrigin.BottomLeft, SampleCount = 0, StencilBits = 0, RenderTargetHandle = IntPtr.Zero, }; var surface = SKSurface.Create(context, renderTarget); // draw (UNCHANGED) var canvas = surface.Canvas; // ... ``` -------------------------------- ### SkiaSharp.GRGlTextureInfo Added Constructor Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md Documents an added constructor to the `SkiaSharp.GRGlTextureInfo` type, allowing initialization with a target and ID. ```csharp public GRGlTextureInfo (uint target, uint id); ``` -------------------------------- ### API Documentation for SkiaSharp.Resources.ResourceProvider Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Resources/3.0.0/SkiaSharp.Resources.md Documents the abstract ResourceProvider class, serving as the base for all resource loading mechanisms within SkiaSharp.Resources. It defines core methods for loading resource data by name or path. ```APIDOC SkiaSharp.Resources.ResourceProvider: Type: public abstract class ResourceProvider : SkiaSharp.SKObject, SkiaSharp.ISKReferenceCounted, SkiaSharp.ISKSkipObjectRegistration Methods: Load(resourceName: string) -> SkiaSharp.SKData resourceName: The name of the resource to load. Returns: The loaded resource data. Load(resourcePath: string, resourceName: string) -> SkiaSharp.SKData resourcePath: The path to the resource. resourceName: The name of the resource to load. Returns: The loaded resource data. ``` -------------------------------- ### New Type: SkiaSharp.SKBitmapReleaseDelegate Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.55.1/SkiaSharp.md Introduces the new `SKBitmapReleaseDelegate` delegate type, used for custom pixel release callbacks when installing pixels into an `SKBitmap`. ```APIDOC public sealed delegate SKBitmapReleaseDelegate : System.MulticastDelegate, System.ICloneable, System.Runtime.Serialization.ISerializable { // constructors public SKBitmapReleaseDelegate (object object, IntPtr method); // methods public virtual System.IAsyncResult BeginInvoke (IntPtr address, object context, System.AsyncCallback callback, object object); public virtual void EndInvoke (System.IAsyncResult result); public virtual void Invoke (IntPtr address, object context); } ``` -------------------------------- ### Sample Copyright Disclaimer for Library Development Source: https://github.com/mono/skiasharp/blob/main/External-Dependency-Info.txt This sample text provides a template for a copyright disclaimer. It is intended for employers or schools to sign, formally disclaiming any copyright interest in a library developed by an employee or student, ensuring the library can be freely licensed. ```Text Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice ``` -------------------------------- ### Define New Class SkiaSharp.SKHorizontalRunBuffer Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.1/SkiaSharp.md Defines `SKHorizontalRunBuffer`, a sealed class extending `SKRunBuffer` for managing horizontal run positions, with methods to get and set position spans. ```csharp public sealed class SKHorizontalRunBuffer : SkiaSharp.SKRunBuffer { // methods public System.Span GetPositionSpan (); public void SetPositions (System.ReadOnlySpan positions); } ``` -------------------------------- ### Verify SkiaSharp P/Invoke Definitions Source: https://github.com/mono/skiasharp/blob/main/utils/README.md This tool verifies the generated p/invoke definitions against the Skia source. It requires a configuration file (`--config`) specifying the JSON file for definitions and the root path to the Skia source (`--skia`). An optional output path (`--output`) can also be specified. ```pwsh dotnet run --project=utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj -- verify --config binding/libSkiaSharp.json --skia externals/skia ``` -------------------------------- ### Apache License 2.0 Boilerplate Notice Source: https://github.com/mono/skiasharp/blob/main/External-Dependency-Info.txt This snippet provides the standard boilerplate notice for applying the Apache License, Version 2.0, to your work. It is intended to be included directly in source code files, enclosed within the appropriate comment syntax for the specific file format. Users must replace the bracketed placeholders [yyyy] and [name of copyright owner] with their own identifying information. ```Text Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` -------------------------------- ### API Documentation for SkiaSharp.Resources.FileResourceProvider Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Resources/3.0.0/SkiaSharp.Resources.md Documents the FileResourceProvider class, designed for loading resources from the local file system. It allows specifying a base directory and supports optional pre-decoding. ```APIDOC SkiaSharp.Resources.FileResourceProvider: Type: public sealed class FileResourceProvider : SkiaSharp.Resources.ResourceProvider, SkiaSharp.ISKReferenceCounted, SkiaSharp.ISKSkipObjectRegistration Constructors: FileResourceProvider(baseDirectory: string, preDecode: bool) baseDirectory: The base directory for loading files. preDecode: A boolean indicating whether to pre-decode resources. ``` -------------------------------- ### Define New Class SkiaSharp.SKPositionedRunBuffer Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.1/SkiaSharp.md Defines `SKPositionedRunBuffer`, a sealed class extending `SKRunBuffer` for managing positioned run data, with methods to get and set `SKPoint` position spans. ```csharp public sealed class SKPositionedRunBuffer : SkiaSharp.SKRunBuffer { // methods public System.Span GetPositionSpan (); public void SetPositions (System.ReadOnlySpan positions); } ``` -------------------------------- ### Obsoleted SetRenderer Method in SKGLTextureView (Android) Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views/1.68.0/SkiaSharp.Views.Android.md The public virtual SetRenderer method, which takes an SKGLTextureView.ISKRenderer, has been marked as obsolete in SkiaSharp.Views.Android.SKGLTextureView. Consider using alternative rendering setup methods. ```diff [Obsolete ()] public virtual void SetRenderer (SKGLTextureView.ISKRenderer renderer); ``` -------------------------------- ### Run WASM Unit Tests in Browser Source: https://github.com/mono/skiasharp/blob/main/utils/README.md This tool runs WebAssembly (WASM) unit tests in a browser. It takes a URL as an argument (e.g., `http://localhost:5000/`) and supports optional parameters: `--output` for test results file (e.g., `TestResults.xml`), `--timeout` in seconds (e.g., `30`), and `--no-headless` to run the browser with a visible UI. ```pwsh dotnet run --project=utils/WasmTestRunner/WasmTestRunner.csproj -- "http://localhost:5000/" ``` -------------------------------- ### Added SKPaintGLSurfaceEventArgs Constructors Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md Presents the new constructors introduced for `SkiaSharp.Views.Windows.SKPaintGLSurfaceEventArgs`, offering updated initialization options with `SKImageInfo`. ```C# public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -------------------------------- ### Obsoleted SetRenderer Method in SKGLSurfaceView (Android) Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views/1.68.0/SkiaSharp.Views.Android.md The public virtual SetRenderer method, which takes an SKGLSurfaceView.ISKRenderer, has been marked as obsolete in SkiaSharp.Views.Android.SKGLSurfaceView. Consider using alternative rendering setup methods. ```diff [Obsolete ()] public virtual void SetRenderer (SKGLSurfaceView.ISKRenderer renderer); ``` -------------------------------- ### HarfBuzzSharp.Feature API Definition Source: https://github.com/mono/skiasharp/blob/main/changelogs/HarfBuzzSharp/1.4.5/HarfBuzzSharp.md Defines the `Feature` struct, used to specify OpenType font features for text shaping. It includes properties for start and end indices, a feature tag, and a value. ```csharp public struct Feature { // properties public uint End { get; set; } public uint Start { get; set; } public uint Tag { get; set; } public uint Value { get; set; } } ``` -------------------------------- ### SkiaSharp.SKDocument: Added Static CreateXps Methods Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.57.0/SkiaSharp.md Adds static `CreateXps` methods to the SkiaSharp.SKDocument class, facilitating the creation of XPS documents, either to a stream or a file path, with a specified DPI. ```csharp public static SKDocument CreateXps (SKWStream stream, float dpi); public static SKDocument CreateXps (string path, float dpi); ``` -------------------------------- ### Remove SKLattice.Flags Property Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md The `Flags` property has been removed from `SkiaSharp.SKLattice`. This property previously allowed getting or setting an array of `SKLatticeFlags`. Developers should review their usage of `SKLattice` and adjust accordingly. ```csharp public SKLatticeFlags[] Flags { get; set; } ``` -------------------------------- ### API Documentation for SkiaSharp.Resources.DataUriResourceProvider Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Resources/3.0.0/SkiaSharp.Resources.md Documents the DataUriResourceProvider class, which enables loading resources directly from data URIs. It supports optional pre-decoding for performance optimization. ```APIDOC SkiaSharp.Resources.DataUriResourceProvider: Type: public sealed class DataUriResourceProvider : SkiaSharp.Resources.ResourceProvider, SkiaSharp.ISKReferenceCounted, SkiaSharp.ISKSkipObjectRegistration Constructors: DataUriResourceProvider(preDecode: bool) preDecode: A boolean indicating whether to pre-decode resources. DataUriResourceProvider(fallbackProvider: SkiaSharp.Resources.ResourceProvider, preDecode: bool) fallbackProvider: An optional fallback resource provider. preDecode: A boolean indicating whether to pre-decode resources. ``` -------------------------------- ### Added SKPaintSurfaceEventArgs Constructor Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md Introduces the new constructor for `SkiaSharp.Views.Windows.SKPaintSurfaceEventArgs`, which includes `SKImageInfo` and `rawInfo` parameters for initialization. ```C# public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -------------------------------- ### SkiaSharp.SKCodec API Additions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.56.1/SkiaSharp.md Outlines new properties and methods added to the `SkiaSharp.SKCodec` class, focusing on scanline-based decoding operations such as retrieving scanline information and starting scanline decodes with various options. ```APIDOC SkiaSharp.SKCodec: Properties Added: public int NextScanline { get; } public SKCodecScanlineOrder ScanlineOrder { get; } Methods Added: public int GetOutputScanline (int inputScanline) public int GetScanlines (IntPtr dst, int countLines, int rowBytes) public bool SkipScanlines (int countLines) public SKCodecResult StartScanlineDecode (SKImageInfo info) public SKCodecResult StartScanlineDecode (SKImageInfo info, SKCodecOptions options) public SKCodecResult StartScanlineDecode (SKImageInfo info, SKCodecOptions options, SKColorTable colorTable, ref int colorTableCount) public SKCodecResult StartScanlineDecode (SKImageInfo info, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) ``` -------------------------------- ### Add SKLattice Properties Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md New properties, `Colors` and `RectTypes`, have been added to `SkiaSharp.SKLattice`. These properties allow getting or setting arrays of `SKColor` and `SKLatticeRectType` respectively, providing more control over lattice rendering. ```csharp public SKColor[] Colors { get; set; } public SKLatticeRectType[] RectTypes { get; set; } ``` -------------------------------- ### SkiaSharp.GRGlTextureInfo API Additions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Details the API additions to the `SkiaSharp.GRGlTextureInfo` type, including a new constructor, the implementation of `System.IEquatable`, and new methods for equality comparison. ```csharp public GRGlTextureInfo (uint target, uint id); ``` ```csharp System.IEquatable ``` ```csharp public virtual bool Equals (GRGlTextureInfo obj); public override bool Equals (object obj); public override int GetHashCode (); public static bool op_Equality (GRGlTextureInfo left, GRGlTextureInfo right); public static bool op_Inequality (GRGlTextureInfo left, GRGlTextureInfo right); ``` -------------------------------- ### New Type: SkiaSharp.GRVkExtensionsSharpVkExtensions API Definition Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Vulkan.SharpVk/2.80.0/SkiaSharp.Vulkan.SharpVk.md Defines the GRVkExtensionsSharpVkExtensions static class, which provides extension methods for GRVkExtensions. These methods facilitate the initialization of Vulkan extensions using a procedure address delegate, instance, physical device, and optional arrays of instance and device extensions. ```C# public static class GRVkExtensionsSharpVkExtensions { // methods public static void Initialize (this GRVkExtensions extensions, GRSharpVkGetProcedureAddressDelegate getProc, SharpVk.Instance instance, SharpVk.PhysicalDevice physicalDevice); public static void Initialize (this GRVkExtensions extensions, GRSharpVkGetProcedureAddressDelegate getProc, SharpVk.Instance instance, SharpVk.PhysicalDevice physicalDevice, string[] instanceExtensions, string[] deviceExtensions); } ``` ```APIDOC Static Class: SkiaSharp.GRVkExtensionsSharpVkExtensions Methods: Initialize(this GRVkExtensions extensions, GRSharpVkGetProcedureAddressDelegate getProc, SharpVk.Instance instance, SharpVk.PhysicalDevice physicalDevice): static void Initialize(this GRVkExtensions extensions, GRSharpVkGetProcedureAddressDelegate getProc, SharpVk.Instance instance, SharpVk.PhysicalDevice physicalDevice, string[] instanceExtensions, string[] deviceExtensions): static void ``` -------------------------------- ### Add Text and Glyph Methods to SkiaSharp.SKPaint Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.1/SkiaSharp.md Expands SKPaint's capabilities with numerous methods for breaking text, counting and getting glyphs, measuring text, calculating text intercepts, and retrieving text paths. ```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); protected override void DisposeNative (); 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 (); ``` -------------------------------- ### SkiaSharp.SKBitmap API Additions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Outlines the new static and instance methods added to the `SkiaSharp.SKBitmap` class, providing enhanced capabilities for image decoding, encoding, resizing, and conversion to shaders. ```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); ``` -------------------------------- ### Add New Methods to SKPathMeasure in SkiaSharp Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md Introduces several new methods to SKPathMeasure for querying path properties, such as retrieving a matrix at a specific distance, getting position or tangent, extracting a segment, and setting the path to be measured. ```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); ``` -------------------------------- ### New Type: SkiaSharp.Views.Maui.Controls.Hosting.AppHostBuilderExtensions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.Maui.Controls.Compatibility/2.88.0/SkiaSharp.Views.Maui.Controls.Compatibility.md Documents the new `AppHostBuilderExtensions` class within the `SkiaSharp.Views.Maui.Controls.Hosting` namespace. This static class provides the `UseSkiaSharp` extension method for `Microsoft.Maui.Hosting.MauiAppBuilder`, allowing developers to configure SkiaSharp integration with options to register renderers and replace handlers. ```C# public static class AppHostBuilderExtensions { // methods public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharp (this Microsoft.Maui.Hosting.MauiAppBuilder builder, bool registerRenderers, bool replaceHandlers); } ``` -------------------------------- ### New SKPixmap Methods for Pixel Manipulation and Scaling Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md Introduces several new methods to `SKPixmap`, enabling operations like erasing pixels, extracting subsets, getting pixel colors, reading pixels, resetting with simplified parameters, and scaling. ```csharp public bool Erase (SKColor color); public bool Erase (SKColor color, SKRectI subset); public SKPixmap ExtractSubset (SKRectI subset); public bool ExtractSubset (SKPixmap result, SKRectI subset); public SKColor GetPixelColor (int x, int y); public IntPtr GetPixels (int x, int y); public bool ReadPixels (SKImageInfo dstInfo, IntPtr dstPixels, int dstRowBytes, int srcX, int srcY, SKTransferFunctionBehavior behavior); public void Reset (SKImageInfo info, IntPtr addr, int rowBytes); public bool ScalePixels (SKPixmap destination, SKFilterQuality quality); ``` -------------------------------- ### Generate SkiaSharp P/Invoke Layer Source: https://github.com/mono/skiasharp/blob/main/utils/README.md This tool helps generate p/invoke definitions and structures from C header files for SkiaSharp. It requires a configuration file (`--config`) specifying the JSON file for definitions, the root path to the Skia source (`--skia`), and the output file path (`--output`) for the generated C# file. ```pwsh .\utils\generate.ps1 ``` -------------------------------- ### API Documentation for SkiaSharp.Views.Maui.Controls.Hosting.AppHostBuilderExtensions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.Maui.Controls/2.88.0/SkiaSharp.Views.Maui.Controls.md Documents the SkiaSharp.Views.Maui.Controls.Hosting.AppHostBuilderExtensions class, which provides extension methods for `Microsoft.Maui.Hosting.MauiAppBuilder` to integrate SkiaSharp into .NET MAUI applications. ```APIDOC public static class AppHostBuilderExtensions { // methods public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharp (this Microsoft.Maui.Hosting.MauiAppBuilder builder); } ``` -------------------------------- ### New Constructor for SKRoundRect Class Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Highlights the addition of a new constructor to `SkiaSharp.SKRoundRect` that allows initialization with an `SKRect` and a uniform radius, simplifying the creation of rounded rectangles with consistent corner radii. ```csharp public SKRoundRect (SKRect rect, float radius); ``` -------------------------------- ### SkiaSharp.SKBitmap Added Methods Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md Documents new static and instance methods added to the `SkiaSharp.SKBitmap` type for decoding, encoding, resizing, and converting to shaders. ```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); ``` -------------------------------- ### SkiaSharp.SKImageInfo Added Method Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.humanreadable.md Documents a new method added to the `SkiaSharp.SKImageInfo` type for creating a new info with a specified size. ```csharp public SKImageInfo WithSize (SKSizeI size); ``` -------------------------------- ### SkiaSharp.GRGlFramebufferInfo API Additions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Documents the API additions to the `SkiaSharp.GRGlFramebufferInfo` type, including the implementation of `System.IEquatable` and new methods for equality comparison. ```csharp System.IEquatable ``` ```csharp public virtual bool Equals (GRGlFramebufferInfo obj); public override bool Equals (object obj); public override int GetHashCode (); public static bool op_Equality (GRGlFramebufferInfo left, GRGlFramebufferInfo right); public static bool op_Inequality (GRGlFramebufferInfo left, GRGlFramebufferInfo right); ``` -------------------------------- ### SKMatrix: Added Full Constructor Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.1/SkiaSharp.humanreadable.md A new constructor is added to SKMatrix, allowing direct initialization with all nine matrix components (scale, skew, translate, and perspective), providing full control over matrix creation. ```csharp public SKMatrix (float scaleX, float skewX, float transX, float skewY, float scaleY, float transY, float persp0, float persp1, float persp2); ``` -------------------------------- ### Get Text Intercepts API (Obsolete) - SkiaSharp C# Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md Calculates the intercepts of text with specified vertical bounds, either from an `SKTextBlob` or from text at a given X, Y coordinate. This obsolete method provides overloads for various text input types, including `SKTextBlob`, byte arrays, `ReadOnlySpan`, strings, and raw memory pointers. ```C# [Obsolete ()] public float[] GetTextIntercepts (SKTextBlob text, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetTextIntercepts (byte[] text, float x, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetTextIntercepts (System.ReadOnlySpan text, float x, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetTextIntercepts (System.ReadOnlySpan text, float x, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetTextIntercepts (string text, float x, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetTextIntercepts (IntPtr text, int length, float x, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetTextIntercepts (IntPtr text, IntPtr length, float x, float y, float upperBounds, float lowerBounds); ``` -------------------------------- ### Add constructor to SKPaintGLSurfaceEventArgs Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views/1.68.2/SkiaSharp.Views.UWP.md Documents the addition of a new public constructor to the `SkiaSharp.Views.UWP.SKPaintGLSurfaceEventArgs` class, allowing initialization with surface, render target, origin, color type, and GL framebuffer info. ```csharp public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); ``` ```APIDOC SkiaSharp.Views.UWP.SKPaintGLSurfaceEventArgs: Added Constructor: public SKPaintGLSurfaceEventArgs( surface: SkiaSharp.SKSurface, renderTarget: SkiaSharp.GRBackendRenderTarget, origin: SkiaSharp.GRSurfaceOrigin, colorType: SkiaSharp.SKColorType, glInfo: SkiaSharp.GRGlFramebufferInfo ); ``` -------------------------------- ### Get Positioned Text Intercepts API (Obsolete) - SkiaSharp C# Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md Determines the intercepts of text with specified upper and lower bounds, given an array of `SKPoint` positions for each glyph. This obsolete method is useful for precise text layout analysis. It accepts text in various formats and `SKPoint` arrays or `ReadOnlySpan` for positioning. ```C# [Obsolete ()] public float[] GetPositionedTextIntercepts (byte[] text, SKPoint[] positions, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetPositionedTextIntercepts (System.ReadOnlySpan text, System.ReadOnlySpan positions, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetPositionedTextIntercepts (System.ReadOnlySpan text, System.ReadOnlySpan positions, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetPositionedTextIntercepts (string text, SKPoint[] positions, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetPositionedTextIntercepts (IntPtr text, int length, SKPoint[] positions, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetPositionedTextIntercepts (IntPtr text, IntPtr length, SKPoint[] positions, float upperBounds, float lowerBounds); ``` -------------------------------- ### Get Glyph Widths API (Obsolete) - SkiaSharp C# Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md Retrieves the widths of individual glyphs for a given text string, along with their bounding rectangles. This method is marked as obsolete and should be replaced with current SkiaSharp text measurement APIs. It supports various text input formats including strings and raw memory pointers. ```C# [Obsolete ()] public float[] GetGlyphWidths (string text, out SKRect[] bounds); ``` ```C# [Obsolete ()] public float[] GetGlyphWidths (IntPtr text, int length, out SKRect[] bounds); ``` ```C# [Obsolete ()] public float[] GetGlyphWidths (IntPtr text, IntPtr length, out SKRect[] bounds); ``` -------------------------------- ### SKPointI Implements IEquatable and Adds Equals Method Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Indicates that `SkiaSharp.SKPointI` now implements `System.IEquatable` and includes the corresponding `Equals` method, allowing for direct value comparison between `SKPointI` instances. ```csharp System.IEquatable public virtual bool Equals (SKPointI obj); ``` -------------------------------- ### Get Horizontal Text Intercepts API (Obsolete) - SkiaSharp C# Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md Calculates the horizontal intercepts of text with a given Y-coordinate, considering a set of X-positions and vertical bounds. This obsolete method helps determine where text crosses a horizontal line. It supports various text input types and `float` arrays or `ReadOnlySpan` for X-positions. ```C# [Obsolete ()] public float[] GetHorizontalTextIntercepts (byte[] text, float[] xpositions, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetHorizontalTextIntercepts (System.ReadOnlySpan text, System.ReadOnlySpan xpositions, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetHorizontalTextIntercepts (System.ReadOnlySpan text, System.ReadOnlySpan xpositions, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetHorizontalTextIntercepts (string text, float[] xpositions, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetHorizontalTextIntercepts (IntPtr text, int length, float[] xpositions, float y, float upperBounds, float lowerBounds); ``` ```C# [Obsolete ()] public float[] GetHorizontalTextIntercepts (IntPtr text, IntPtr length, float[] xpositions, float y, float upperBounds, float lowerBounds); ``` -------------------------------- ### SKImageInfo New Constructors Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.53.0/SkiaSharp.md Introduces new constructors for the `SKImageInfo` class, providing more flexible ways to initialize image information with width, height, and optionally a specific color type. ```csharp public SKImageInfo (int width, int height); public SKImageInfo (int width, int height, SKColorType colorType); ``` -------------------------------- ### Get Glyphs API (Obsolete) - SkiaSharp C# Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md Obtains the glyph indices for a given text input. This method is deprecated and provides overloads for processing text from byte arrays, `ReadOnlySpan`, `ReadOnlySpan`, strings, and raw memory pointers. The returned `ushort[]` array contains the glyph IDs corresponding to the input text. ```C# [Obsolete ()] public ushort[] GetGlyphs (byte[] text); ``` ```C# [Obsolete ()] public ushort[] GetGlyphs (System.ReadOnlySpan text); ``` ```C# [Obsolete ()] public ushort[] GetGlyphs (System.ReadOnlySpan text); ``` ```C# [Obsolete ()] public ushort[] GetGlyphs (string text); ``` ```C# [Obsolete ()] public ushort[] GetGlyphs (IntPtr text, int length); ``` ```C# [Obsolete ()] public ushort[] GetGlyphs (IntPtr text, IntPtr length); ``` -------------------------------- ### SKSurface Create and CreateAsRenderTarget Method Overloads Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md Lists various overloads for the `SKSurface.Create` and `SKSurface.CreateAsRenderTarget` methods, allowing surface creation with different backend contexts, render targets, textures, image information, and properties. ```APIDOC public static SKSurface Create (GRContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProperties props); public static SKSurface Create (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace); public static SKSurface Create (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKSurfaceProperties props); public static SKSurface Create (SKImageInfo info, IntPtr pixels, int rowBytes, SKSurfaceReleaseDelegate releaseProc, object context, SKSurfaceProperties props); public static SKSurface Create (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProperties props); public static SKSurface Create (GRContext context, bool budgeted, SKImageInfo info, int sampleCount, GRSurfaceOrigin origin, SKSurfaceProperties props, bool shouldCreateWithMips); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, SKColorType colorType); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, SKColorType colorType, SKSurfaceProperties props); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKSurfaceProperties props); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKSurfaceProperties props); public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProperties props); public static SKSurface CreateNull (int width, int height); ``` -------------------------------- ### Get Text Path API (Obsolete) - SkiaSharp C# Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/3.0.0/SkiaSharp.md Generates an `SKPath` object representing the outline of the given text. This obsolete method allows converting text into a graphical path for drawing or manipulation. It offers various overloads for text input (byte arrays, `ReadOnlySpan`, string, `IntPtr`) and positioning (array of `SKPoint`s or a single X, Y coordinate). ```C# [Obsolete ()] public SKPath GetTextPath (byte[] text, SKPoint[] points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (System.ReadOnlySpan text, System.ReadOnlySpan points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (System.ReadOnlySpan text, System.ReadOnlySpan points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (string text, SKPoint[] points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (byte[] text, float x, float y); ``` ```C# [Obsolete ()] public SKPath GetTextPath (IntPtr buffer, int length, SKPoint[] points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (IntPtr buffer, int length, System.ReadOnlySpan points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (IntPtr buffer, IntPtr length, SKPoint[] points); ``` ```C# [Obsolete ()] public SKPath GetTextPath (System.ReadOnlySpan text, float x, float y); ``` ```C# [Obsolete ()] public SKPath GetTextPath (System.ReadOnlySpan text, float x, float y); ``` ```C# [Obsolete ()] public SKPath GetTextPath (string text, float x, float y); ``` ```C# [Obsolete ()] public SKPath GetTextPath (IntPtr buffer, int length, float x, float y); ``` ```C# [Obsolete ()] public SKPath GetTextPath (IntPtr buffer, IntPtr length, float x, float y); ``` -------------------------------- ### Add SKPixmap Constructor Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.56.2/SkiaSharp.md Introduces a new constructor for `SKPixmap` that allows initialization with `SKImageInfo` and a memory address. ```APIDOC Added constructor: public SKPixmap (SKImageInfo info, IntPtr addr); ``` -------------------------------- ### Obsoleted SKPaintGLSurfaceEventArgs Constructor Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md Documents a constructor of `SkiaSharp.Views.Windows.SKPaintGLSurfaceEventArgs` that has been marked as obsolete, indicating it should no longer be used. ```C# [Obsolete ()] public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); ``` -------------------------------- ### Example of Android R Class Structure in C# Source: https://github.com/mono/skiasharp/blob/main/samples/Gallery/Uno.WinUI/SkiaSharpSample.Mobile/Android/Resources/AboutResources.txt This C# code snippet illustrates the structure of the auto-generated 'R' class in an Android application. The 'R' class provides static nested classes and integer constants (resource IDs) for each resource type (drawable, layout, strings) and individual resources within them, allowing programmatic access to compiled resources. ```C# public class R { public class drawable { public const int icon = 0x123; } public class layout { public const int main = 0x456; } public class strings { public const int first_string = 0xabc; public const int second_string = 0xbcd; } } ``` -------------------------------- ### Add GRBackendTexture Constructor for Vulkan Info Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/2.80.0/SkiaSharp.md Introduces a new constructor for SkiaSharp.GRBackendTexture. This constructor enables the creation of a backend texture by providing its width, height, and a GRVkImageInfo object, streamlining Vulkan texture creation. ```csharp public GRBackendTexture (int width, int height, GRVkImageInfo vkInfo); ``` -------------------------------- ### Added Constructor for SKPaintSurfaceEventArgs (watchOS) Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.watchOS.md Documents the addition of a new constructor to the `SKPaintSurfaceEventArgs` class in SkiaSharp.Views.watchOS. This constructor allows initializing an instance with a `SKSurface`, `SKImageInfo`, and `SKImageInfo` for raw image data. ```C# public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -------------------------------- ### New SKPaintSurfaceEventArgs Constructor Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Mac.md Introduces a new constructor for `SKPaintSurfaceEventArgs`, allowing instantiation with both `SKImageInfo` and `rawInfo`. ```csharp public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -------------------------------- ### SKPoint3 Implements IEquatable and Adds Equals Method Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Indicates that `SkiaSharp.SKPoint3` now implements `System.IEquatable` and includes the corresponding `Equals` method, allowing for direct value comparison between `SKPoint3` instances. ```csharp System.IEquatable public virtual bool Equals (SKPoint3 obj); ``` -------------------------------- ### Add SKImageInfo.WithSize Method Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md A new instance method, `WithSize`, has been added to `SkiaSharp.SKImageInfo`. This method allows creating a new `SKImageInfo` instance with updated width and height values, while preserving other properties of the original `SKImageInfo`. ```csharp public SKImageInfo WithSize (int width, int height); ``` -------------------------------- ### SkiaExtensions Added Methods Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.0/SkiaSharp.md New extension methods added to `SkiaSharp.SkiaExtensions` for converting between `GRPixelConfig`, `SKColorType`, and `SKBitmapResizeMethod`. ```C# public static SKColorType ToColorType (this GRPixelConfig config); [Obsolete] public static SKFilterQuality ToFilterQuality (this SKBitmapResizeMethod method); public static uint ToGlSizedFormat (this GRPixelConfig config); public static uint ToGlSizedFormat (this SKColorType colorType); public static GRPixelConfig ToPixelConfig (this SKColorType colorType); ``` -------------------------------- ### Add GRBackendRenderTarget Constructor for Vulkan Image Info Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/2.80.0/SkiaSharp.md Introduces a new constructor for SkiaSharp.GRBackendRenderTarget. This constructor allows creating a render target by specifying its dimensions, sample count, and a GRVkImageInfo object, facilitating Vulkan integration. ```csharp public GRBackendRenderTarget (int width, int height, int sampleCount, GRVkImageInfo vkImageInfo); ``` -------------------------------- ### New SKSvgCanvas.Create Methods for Streams Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Introduces new `Create` method overloads in `SkiaSharp.SKSvgCanvas` for creating an `SKCanvas` using `SKWStream` or `System.IO.Stream` objects. ```APIDOC public static SKCanvas Create (SKRect bounds, SKWStream stream); public static SKCanvas Create (SKRect bounds, System.IO.Stream stream); ``` -------------------------------- ### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.AppHostBuilderExtensions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.Maui.Controls.Compatibility/2.88.0/SkiaSharp.Views.Maui.Controls.Compatibility.md Documents the new `AppHostBuilderExtensions` class within the `SkiaSharp.Views.Maui.Controls.Compatibility` namespace. This static class provides an extension method, `UseSkiaSharpCompatibilityRenderers`, for `Microsoft.Maui.Hosting.MauiAppBuilder` to enable SkiaSharp compatibility renderers, though it is marked as obsolete. ```C# public static class AppHostBuilderExtensions { // methods [Obsolete] public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharpCompatibilityRenderers (this Microsoft.Maui.Hosting.MauiAppBuilder builder); } ``` -------------------------------- ### SkiaSharp.GRGlBackendTextureDesc API Additions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Outlines the API additions to the `SkiaSharp.GRGlBackendTextureDesc` type, including a new interface, new properties for rectangle and size, and new methods for equality comparison. ```csharp System.IEquatable ``` ```csharp public SKRectI Rect { get; } public SKSizeI Size { get; } ``` ```csharp public virtual bool Equals (GRGlBackendTextureDesc obj); public override bool Equals (object obj); public override int GetHashCode (); public static bool op_Equality (GRGlBackendTextureDesc left, GRGlBackendTextureDesc right); public static bool op_Inequality (GRGlBackendTextureDesc left, GRGlBackendTextureDesc right); ``` -------------------------------- ### API Documentation for SkiaSharp.Views.Windows.GlobalStaticResources Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.Uno.WinUI/2.88.1/SkiaSharp.Views.Windows.md This sealed class provides static methods for managing global static resources within SkiaSharp.Views.Windows applications. It includes methods for initializing resources, registering default styles, and finding resources by name, with some methods marked as obsolete. ```csharp public sealed class GlobalStaticResources { // constructors public GlobalStaticResources (); // methods [Obsolete] public static object FindResource (string name); public static void Initialize (); public static void RegisterDefaultStyles (); public static void RegisterResourceDictionariesBySource (); } ``` -------------------------------- ### Obsolete SKSvgCanvas.Create Method for SKXmlWriter Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Documents the `Create` method in `SkiaSharp.SKSvgCanvas` that has been marked as obsolete. This method previously allowed creating an `SKCanvas` with an `SKXmlWriter`. ```APIDOC [Obsolete ()] public static SKCanvas Create (SKRect bounds, SKXmlWriter writer); ``` -------------------------------- ### API Documentation: SkiaSharp.Views.tvOS.dll Version Changes Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views/1.60.0/SkiaSharp.Views.tvOS.md This entry provides a structured overview of the API changes in SkiaSharp.Views.tvOS.dll, detailing the assembly version update and the specific type and methods that have been added. It serves as a reference for understanding the evolution of the API. ```APIDOC Assembly: SkiaSharp.Views.tvOS.dll Version Changed: 1.60.0.0 (New) vs 1.59.0.0 (Old) Namespace: SkiaSharp.Views.tvOS Type Changed: iOSExtensions Methods Added: ToUIImage (this SkiaSharp.SKBitmap skiaBitmap, nfloat scale, UIKit.UIImageOrientation orientation) : UIKit.UIImage ToUIImage (this SkiaSharp.SKPixmap skiaPixmap, nfloat scale, UIKit.UIImageOrientation orientation) : UIKit.UIImage ToUIImage (this SkiaSharp.SKPicture skiaPicture, SkiaSharp.SKSizeI dimensions, nfloat scale, UIKit.UIImageOrientation orientation) : UIKit.UIImage ``` -------------------------------- ### API Changes for SkiaSharp.SKImageInfo Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Documents the API changes for SKImageInfo, including the addition of the System.IEquatable interface, related equality methods, and a new WithSize method. ```csharp Added interface: System.IEquatable Added methods: public virtual bool Equals (SKImageInfo obj); public override bool Equals (object obj); public override int GetHashCode (); public SKImageInfo WithSize (SKSizeI size); public static bool op_Equality (SKImageInfo left, SKImageInfo right); public static bool op_Inequality (SKImageInfo left, SKImageInfo right); ``` -------------------------------- ### SKRectI Implements IEquatable and Adds Equals Method Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Indicates that `SkiaSharp.SKRectI` now implements `System.IEquatable` and includes the corresponding `Equals` method, allowing for direct value comparison between `SKRectI` instances. ```csharp System.IEquatable public virtual bool Equals (SKRectI obj); ``` -------------------------------- ### Added SKPaintGLSurfaceEventArgs Properties Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md Details the new `Info` and `RawInfo` properties added to `SkiaSharp.Views.Windows.SKPaintGLSurfaceEventArgs`, providing access to image information. ```C# public SkiaSharp.SKImageInfo Info { get; } public SkiaSharp.SKImageInfo RawInfo { get; } ``` -------------------------------- ### SkiaSharp.SKCodecFrameInfo API Additions Source: https://github.com/mono/skiasharp/blob/main/changelogs/SkiaSharp/1.68.2/SkiaSharp.md Details the API additions to the `SkiaSharp.SKCodecFrameInfo` type, including the implementation of `System.IEquatable` and new methods for equality comparison. ```csharp System.IEquatable ``` ```csharp public virtual bool Equals (SKCodecFrameInfo obj); public override bool Equals (object obj); public override int GetHashCode (); public static bool op_Equality (SKCodecFrameInfo left, SKCodecFrameInfo right); public static bool op_Inequality (SKCodecFrameInfo left, SKCodecFrameInfo right); ```