public static Task<bool> FillPolygonAsync(
this IReadWriteBitmapData bitmapData,
Color32 color,
IEnumerable<PointF> points,
DrawingOptions? drawingOptions = null,
TaskConfig? asyncConfig = null
)<ExtensionAttribute>
Public Shared Function FillPolygonAsync (
bitmapData As IReadWriteBitmapData,
color As Color32,
points As IEnumerable(Of PointF),
Optional drawingOptions As DrawingOptions = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of Boolean)public:
[ExtensionAttribute]
static Task<bool>^ FillPolygonAsync(
IReadWriteBitmapData^ bitmapData,
Color32 color,
IEnumerable<PointF>^ points,
DrawingOptions^ drawingOptions = nullptr,
TaskConfig^ asyncConfig = nullptr
)[<ExtensionAttribute>]
static member FillPolygonAsync :
bitmapData : IReadWriteBitmapData *
color : Color32 *
points : IEnumerable<PointF> *
?drawingOptions : DrawingOptions *
?asyncConfig : TaskConfig
(* Defaults:
let _drawingOptions = defaultArg drawingOptions null
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task<bool> Every pair of two consecutive points specifies a side of the polygon. In addition, if the last point and the first point do not coincide, they specify the last side of the polygon.
This method does not use optimized shortcuts. If the same polygon is filled repeatedly, creating a Path with PreferCaching enabled and adding the polygon to it can provide a better performance.
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
| ArgumentNullException | bitmapData or points 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. |