ID2D1DeviceContext::CreateBitmapBrush method

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

Syntax


HRESULT CreateBitmapBrush(
  [in]            ID2D1Bitmap *bitmap,
  [in, optional]  D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmapBrushProperties,
  [out]           ID2D1BitmapBrush1 **bitmapBrush
);

Parameters

bitmap [in]

Type: ID2D1Bitmap*

The bitmap to use as the brush.

bitmapBrushProperties [in, optional]

Type: D2D1_BITMAP_BRUSH_PROPERTIES1*

A bitmap brush properties structure.

bitmapBrush [out]

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.

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid parameter was passed to the returning function.

 

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1DeviceContext
D2D1_BITMAP_BRUSH_PROPERTIES1
ID2D1Bitmap
D2D1_BRUSH_PROPERTIES
ID2D1BitmapBrush1

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.