CompositionGraphicsDevice.CaptureAsync 方法

定义

将各种源元素(包括应用程序拥有的可视树)捕获到合成图面。

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)

参数

captureVisual
Visual

要捕获的视觉对象。

size
SizeInt32

图面的大小(以像素为单位)。

pixelFormat
DirectXPixelFormat

图面的像素格式。

alphaMode
DirectXAlphaMode

应如何处理 alpha 通道。

sdrBoost
Single

float

提高 SDR 的量。

返回

一个异步操作,在成功完成后返回 ICompositionSurface

属性

Windows 要求

设备系列
Windows 10, version 2104 (在 10.0.20348.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v12.0 中引入)

适用于