ID2D1DeviceContext::CreateBitmapBrush method

Creates a bitmap brush, the input image is a Direct2D bitmap object.

Syntax

HRESULT CreateBitmapBrush(
  ID2D1Bitmap       *bitmap,
  ID2D1BitmapBrush1 **bitmapBrush
);

Parameters

bitmap

Type: ID2D1Bitmap*

The bitmap to use as the brush.

bitmapBrush

Type: ID2D1BitmapBrush1**

The address of the newly created bitmap brush object.

Return Value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULT Description
S_OK No error occurred.
E_OUTOFMEMORY Direct2D could not allocate sufficient memory to complete the call.
E_INVALIDARG An invalid parameter was passed to the returning function.

Requirements

   
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1_1.h
DLL D2d1.dll

See Also

D2D1_BITMAP_BRUSH_PROPERTIES1

D2D1_BRUSH_PROPERTIES

ID2D1Bitmap

ID2D1BitmapBrush1

ID2D1DeviceContext