Tip
See the Examples section of the AsyncHelper
class for details about how to create a context for possibly async top level methods.
public static bool DrawInto(
this IReadableBitmapData source,
IReadWriteBitmapData target,
IAsyncContext? context,
Rectangle sourceRectangle,
Rectangle targetRectangle,
IQuantizer? quantizer = null,
IDitherer? ditherer = null,
ScalingMode scalingMode = ScalingMode.Auto
)
<ExtensionAttribute>
Public Shared Function DrawInto (
source As IReadableBitmapData,
target As IReadWriteBitmapData,
context As IAsyncContext,
sourceRectangle As Rectangle,
targetRectangle As Rectangle,
Optional quantizer As IQuantizer = Nothing,
Optional ditherer As IDitherer = Nothing,
Optional scalingMode As ScalingMode = ScalingMode.Auto
) As Boolean
public:
[ExtensionAttribute]
static bool DrawInto(
IReadableBitmapData^ source,
IReadWriteBitmapData^ target,
IAsyncContext^ context,
Rectangle sourceRectangle,
Rectangle targetRectangle,
IQuantizer^ quantizer = nullptr,
IDitherer^ ditherer = nullptr,
ScalingMode scalingMode = ScalingMode::Auto
)
[<ExtensionAttribute>]
static member DrawInto :
source : IReadableBitmapData *
target : IReadWriteBitmapData *
context : IAsyncContext *
sourceRectangle : Rectangle *
targetRectangle : Rectangle *
?quantizer : IQuantizer *
?ditherer : IDitherer *
?scalingMode : ScalingMode
(* Defaults:
let _quantizer = defaultArg quantizer null
let _ditherer = defaultArg ditherer null
let _scalingMode = defaultArg scalingMode ScalingMode.Auto
*)
-> bool
This method blocks the caller thread but if context belongs to an async top level method, then the execution may already run on a pool thread. Degree of parallelism, the ability of cancellation and reporting progress depend on how these were configured at the top level method.
When reporting progress, this library always passes a DrawingOperation instance to the generic methods of the IAsyncProgress interface.
ArgumentNullException | source or target is . |
ArgumentOutOfRangeException | scalingMode has an unsupported value. |