public static Task<bool> DrawPathAsync(
this IReadWriteBitmapData bitmapData,
Pen pen,
Path path,
DrawingOptions? drawingOptions = null,
TaskConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function DrawPathAsync (
bitmapData As IReadWriteBitmapData,
pen As Pen,
path As Path,
Optional drawingOptions As DrawingOptions = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of Boolean)
public:
[ExtensionAttribute]
static Task<bool>^ DrawPathAsync(
IReadWriteBitmapData^ bitmapData,
Pen^ pen,
Path^ path,
DrawingOptions^ drawingOptions = nullptr,
TaskConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member DrawPathAsync :
bitmapData : IReadWriteBitmapData *
pen : Pen *
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 drawing 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, pen 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. |