ID2D1RenderTarget::CreateBitmap method

Creates an uninitialized Direct2D bitmap.

Syntax


HRESULT CreateBitmap(
              D2D1_SIZE_U            size,
  [ref] const D2D1_BITMAP_PROPERTIES &bitmapProperties,
  [out]       ID2D1Bitmap            **bitmap
);

Parameters

size

Type: D2D1_SIZE_U

The dimension of the bitmap to create in pixels.

bitmapProperties [ref]

Type: const D2D1_BITMAP_PROPERTIES

The pixel format and dots per inch (DPI) of the bitmap to create.

bitmap [out]

Type: ID2D1Bitmap**

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

Return value

Type: HRESULT

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

Requirements

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]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget

 

 

Show: