Table of Contents

Method ApplyPixelSnapping

Namespace
Alternet.Skia
Assembly
Alternet.UI.Common.dll

ApplyPixelSnapping(SKCanvas)

Convenience: apply the pixel-snapping translate to the canvas. It saves the canvas state and returns an IDisposable that restores when disposed: using (ApplyPixelSnapping(canvas)) { ... } // paints inside will be offset

public static SKAutoCanvasRestore ApplyPixelSnapping(SKCanvas canvas)

Parameters

canvas SKCanvas

The canvas to translate.

Returns

SKAutoCanvasRestore

An SKAutoCanvasRestore that will restore the canvas when disposed.