Class SkiaSurfaceOnMswDib
Provides functionality for creating and managing a SkiaSharp SKSurface backed by a top-down Device Independent Bitmap (DIB) on Windows.
public class SkiaSurfaceOnMswDib
- Inheritance
-
SkiaSurfaceOnMswDib
Remarks
This class is designed to facilitate rendering with SkiaSharp on a Windows platform using a memory-based DIB. It provides methods to ensure the surface is properly initialized, render content to the surface, and transfer the rendered content to a target device context (HDC).
The surface is created as a 32-bit BGRA image with pre-multiplied alpha, and it is optimized for top-down memory layout, which is required by SkiaSharp.
Call EnsureSurface(int, int) to initialize or resize the surface, Paint(nint, SKRectI, SKSizeI, SKColor, Action<SKSurface, SKRectI>) to render content and transfer it to a target HDC, and DisposeSurface() to release resources when the surface is no longer needed.
Methods
- DisposeSurface()
Releases all resources associated with the surface and resets related state.
- EnsureSurface(int, int)
Ensures that a drawing surface with the specified dimensions is created and ready for use.
- Paint(nint, SKRectI, SKSizeI, SKColor, Action<SKSurface, SKRectI>)
Renders content to the specified target device context within the given clipping region.