ID2D1RenderTarget::CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget**) method (d2d1.h)

Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target and has the same size, DPI, and pixel format (but not alpha mode) as the current render target.

Syntax

HRESULT CreateCompatibleRenderTarget(
  ID2D1BitmapRenderTarget **bitmapRenderTarget
);

Parameters

bitmapRenderTarget

Type: [out] ID2D1BitmapRenderTarget**

When this method returns, contains a pointer to a pointer to a new bitmap render target. This parameter is passed uninitialized.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The bitmap render target created by this method is not compatible with GDI, and has an alpha mode of D2D1_ALPHA_MODE_PREMULTIPLIED.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1.h
Library D2d1.lib
DLL D2d1.dll

See also

ID2D1RenderTarget