SKPaint.GetFastBounds(SKRect, SKRect) 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.
Attempts to compute a conservative bounding rectangle that contains the result of drawing the supplied bounds with this paint.
public bool GetFastBounds(SkiaSharp.SKRect bounds, out SkiaSharp.SKRect fastBounds);
Parameters
- bounds
- SKRect
The original bounds of the geometry to be drawn, before any paint effects are considered.
- fastBounds
- SKRect
When this method returns, contains a conservative bounding rectangle that includes any stroke width, mask filter, image filter, or other effects on this paint applied to bounds; otherwise, Empty if the bounds cannot be computed. This parameter is treated as uninitialized.
Returns
true if a conservative bounding rectangle could be computed and was written to fastBounds; otherwise, false.
Remarks
The returned bounds are conservative: they may be larger than the actual affected pixels, but they are guaranteed to enclose them. This is useful for quickly culling draws that fall outside a clip without performing the full draw.