Export (0) Print
Expand All

ID2D1RenderTarget::CreateBitmapBrush method

Creates an ID2D1BitmapBrush from the specified bitmap.

Syntax


HRESULT CreateBitmapBrush(
  [in]   ID2D1Bitmap *bitmap,
  const D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties,
  const D2D1_BRUSH_PROPERTIES &brushProperties,
  [out]  ID2D1BitmapBrush **bitmapBrush
);

Parameters

bitmap [in]

Type: ID2D1Bitmap*

The bitmap contents of the new brush.

bitmapBrushProperties [ref]

Type: const D2D1_BITMAP_BRUSH_PROPERTIES

The extend modes and interpolation mode of the new brush.

brushProperties [ref]

Type: const D2D1_BRUSH_PROPERTIES

The opacity and transform of the new brush.

bitmapBrush [out]

Type: ID2D1BitmapBrush**

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

Return value

Type: HRESULT

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

Examples

For an example showing how to paint an area with a bitmap brush, see How to Create a Bitmap Brush.

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]

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
How to Create a Bitmap Brush
Brushes Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft