public static IAsyncResult BeginFillRectangle(
this IReadWriteBitmapData bitmapData,
Color32 color,
RectangleF rectangle,
DrawingOptions? drawingOptions = null,
AsyncConfig? asyncConfig = null
)<ExtensionAttribute>
Public Shared Function BeginFillRectangle (
bitmapData As IReadWriteBitmapData,
color As Color32,
rectangle As RectangleF,
Optional drawingOptions As DrawingOptions = Nothing,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResultpublic:
[ExtensionAttribute]
static IAsyncResult^ BeginFillRectangle(
IReadWriteBitmapData^ bitmapData,
Color32 color,
RectangleF rectangle,
DrawingOptions^ drawingOptions = nullptr,
AsyncConfig^ asyncConfig = nullptr
)[<ExtensionAttribute>]
static member BeginFillRectangle :
bitmapData : IReadWriteBitmapData *
color : Color32 *
rectangle : RectangleF *
?drawingOptions : DrawingOptions *
?asyncConfig : AsyncConfig
(* Defaults:
let _drawingOptions = defaultArg drawingOptions null
let _asyncConfig = defaultArg asyncConfig null
*)
-> IAsyncResult When filling a rectangle, the right/bottom values of the coordinates are exclusive, so if the width or height is zero, then nothing is drawn.
This method tries to use a shortcut to fill the rectangle directly, which is faster than creating a Path and adding the rectangle to it. A shortcut is possible when the location and size are integer values, and drawingOptions is and the specified color is opaque, or when drawingOptions specifies that no anti-aliasing and no alpha blending is required, the transformation is the identity matrix, and neither Quantizer nor Ditherer is specified.
In .NET Framework 4.0 and above you can use also the FillRectangleAsync methods.
To finish the operation and to get the exception that occurred during the operation you have to call the EndFillRectangle method.
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
| ArgumentNullException | bitmapData is . |
| OverflowException | The coordinates (after a possible transformation specified in drawingOptions) are outside the bounds of an int value. |