ID2D1Factory::CreateWicBitmapRenderTarget method

Creates a render target that renders to a Microsoft Windows Imaging Component (WIC) bitmap.

Syntax


virtual HRESULT CreateWicBitmapRenderTarget(
  [in]   IWICBitmap *target,
  [in]   const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  [out]  ID2D1RenderTarget **renderTarget
) = 0;

Parameters

target [in]

Type: IWICBitmap*

The bitmap that receives the rendering output of the render target.

renderTargetProperties [in]

Type: const D2D1_RENDER_TARGET_PROPERTIES*

The rendering mode, pixel format, remoting options, DPI information, and the minimum DirectX support required for hardware rendering. For information about supported pixel formats, see Supported Pixel Formats and Alpha Modes.

renderTarget [out]

Type: ID2D1RenderTarget**

When this method returns, contains the address of the pointer to the ID2D1RenderTarget object created by this method.

Return value

Type: HRESULT

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

Remarks

You must use D2D1_FEATURE_LEVEL_DEFAULT for the minLevel member of the renderTargetProperties parameter with this method.

Your application should create render targets once and hold onto them for the life of the application or until the D2DERR_RECREATE_TARGET error is received. When you receive this error, you need to recreate the render target (and any resources it created).

  • Applies to Windows Phone

Note   This method isn't supported on Windows Phone and will fail when called on a device with error code 0x8899000b (“There is no hardware rendering device available for this operation”). Because the Windows Phone Emulator supports WARP rendering, this method will fail when called on the emulator with a different error code, 0x88982f80 (wincodec_err_unsupportedpixelformat).

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1Factory

 

 

Community Additions

ADD
Show:
© 2014 Microsoft