This topic has not yet been rated - Rate this topic

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).

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

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.