public static Task<bool> FillPathAsync(
this IReadWriteBitmapData bitmapData,
Brush brush,
Path path,
DrawingOptions? drawingOptions = null,
TaskConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function FillPathAsync (
bitmapData As IReadWriteBitmapData,
brush As Brush,
path As Path,
Optional drawingOptions As DrawingOptions = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of Boolean)
public:
[ExtensionAttribute]
static Task<bool>^ FillPathAsync(
IReadWriteBitmapData^ bitmapData,
Brush^ brush,
Path^ path,
DrawingOptions^ drawingOptions = nullptr,
TaskConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member FillPathAsync :
bitmapData : IReadWriteBitmapData *
brush : Brush *
path : Path *
?drawingOptions : DrawingOptions *
?asyncConfig : TaskConfig
(* Defaults:
let _drawingOptions = defaultArg drawingOptions null
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task<bool>
If the Transformation property of drawingOptions is not the identity matrix, then the path region is not cached, even if PreferCaching is enabled. To improve the performance of filling transformed paths repeatedly, apply the transformations on the path instance instead, and use the identity matrix in drawingOptions.
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
ArgumentNullException | bitmapData, brush, or path is . |
OverflowException | The coordinates (after a possible transformation specified in drawingOptions) are outside the bounds of an int value. |
TaskCanceledException | The operation has been canceled and the ThrowIfCanceled property in asyncConfig was . This exception is thrown when the result is awaited. |