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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈