Applies to: desktop apps | Metro style apps
Creates a bitmap and sets the bitmap as a target from a DXGI surface.
- Surface [in, optional]
The DXGI surface to be set as the target.
This method does not return a value.
This method allows the device context to target a DXGI surface. This is equivalent to calling CreateBitmapFromDxgiSurface followed by SetTarget. The created bitmap can be a source for drawing and a target bitmap. The alpha mode of the created bitmap will be D2D1_ALPHA_MODE_IGNORE. The DPI of the created bitmap will be (96,96). The created bitmap will inherit the bind flags of the DXG surface.
If Surface is NULL, this is equivalent to using
If the provided surface does not support being bound as a render target, the context will return D2DERR_BITMAP_IS_NOT_A_TARGET.
If the surface is not associated with the same device as this device context, the context will return D2DERR_WRONG_RESOURCE_DOMAIN.
Minimum supported client
|Windows 8 Release Preview|
Minimum supported server
|Windows Server 2012|
Build date: 6/26/2012