SKCanvas.SaveLayer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SaveLayer() | |
SaveLayer(SKPaint) |
Saves the canvas state and allocates an offscreen bitmap. |
SaveLayer(SKRect, SKPaint) |
Saves the canvas state and allocates an offscreen bitmap. |
SaveLayer()
SaveLayer(SKPaint)
Saves the canvas state and allocates an offscreen bitmap.
public int SaveLayer (SkiaSharp.SKPaint paint);
Parameters
Returns
The value to pass to RestoreToCount(Int32) to balance this save.
Remarks
This behaves the same as Save() but in addition it allocates an offscreen bitmap. All drawing calls are directed there, and only when the balancing call to Restore() is made is that offscreen transfered to the canvas (or the previous layer).
Applies to
SaveLayer(SKRect, SKPaint)
Saves the canvas state and allocates an offscreen bitmap.
public int SaveLayer (SkiaSharp.SKRect limit, SkiaSharp.SKPaint paint);
Parameters
- limit
- SKRect
This clipping rectangle hint to limit the size of the offscreen bitmap.
Returns
The value to pass to RestoreToCount(Int32) to balance this save.
Remarks
This behaves the same as Save() but in addition it allocates an offscreen bitmap. All drawing calls are directed there, and only when the balancing call to Restore() is made is that offscreen transfered to the canvas (or the previous layer).
The limit rectangle, is used as a hint to limit the size of the offscreen bitmap, and thus drawing may be clipped to it, though that clipping is not guaranteed to happen. If exact clipping is desired, use ClipRect(SKRect, SKClipOperation, Boolean).
Applies to
SkiaSharp