Method Paint
Paint(nint, SKRectI, SKSizeI, SKColor, Action<SKSurface, SKRectI>)
Renders content to the specified target device context within the given clipping region.
public void Paint(nint hdcTarget, SKRectI clip, SKSizeI clientSize, SKColor clearColor, Action<SKSurface, SKRectI> drawAction)
Parameters
hdcTargetnintThe handle to the device context (HDC) where the content will be rendered.
clipSKRectIThe rectangular region of the target to which rendering is restricted. If empty, the entire client area is used.
clientSizeSKSizeIThe size of the client area, in pixels, used to determine the rendering surface dimensions.
clearColorSKColorThe color used to clear the clipping region before drawing. If
SKColors.Transparent, no clearing is performed.drawActionAction<SKSurface, SKRectI>A callback action that performs the actual drawing on the rendering surface. The callback receives the SKSurface to draw on and the clipping region as a SKRectI.
Remarks
This method prepares a rendering surface, applies the specified clipping region,
clears the region with the provided color if necessary, and invokes the
drawAction to
perform custom drawing. After drawing, the rendered content
is copied to the target device
context.