CompositionGraphicsDevice.CaptureAsync Method

Definition

Captures various source elements, including visual trees owned by an application, to a composition surface.

public:
 virtual IAsyncOperation<ICompositionSurface ^> ^ CaptureAsync(Visual ^ captureVisual, SizeInt32 size, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode, float sdrBoost) = CaptureAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ICompositionSurface> CaptureAsync(Visual const& captureVisual, SizeInt32 const& size, DirectXPixelFormat const& pixelFormat, DirectXAlphaMode const& alphaMode, float const& sdrBoost);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<ICompositionSurface> CaptureAsync(Visual captureVisual, SizeInt32 size, DirectXPixelFormat pixelFormat, DirectXAlphaMode alphaMode, float sdrBoost);
function captureAsync(captureVisual, size, pixelFormat, alphaMode, sdrBoost)
Public Function CaptureAsync (captureVisual As Visual, size As SizeInt32, pixelFormat As DirectXPixelFormat, alphaMode As DirectXAlphaMode, sdrBoost As Single) As IAsyncOperation(Of ICompositionSurface)

Parameters

captureVisual
Visual

The visual to capture.

size
SizeInt32

The size in pixels of the surface.

pixelFormat
DirectXPixelFormat

The pixel format of the surface.

alphaMode
DirectXAlphaMode

How the alpha channel should be handled.

sdrBoost
Single

float

The amount to boost SDR.

Returns

An asynchronous operation that returns an ICompositionSurface upon successful completion.

Attributes

Windows requirements

Device family
Windows 10, version 2104 (introduced in 10.0.20348.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v12.0)

Applies to