ID2D1BitmapBrush interface

Paints an area with a bitmap.

When to implement

Custom implementations are not supported.

Members

The ID2D1BitmapBrush interface inherits from ID2D1Brush. ID2D1BitmapBrush also has these types of members:

Methods

The ID2D1BitmapBrush interface has these methods.

MethodDescription
GetBitmap

Gets the bitmap source that this brush uses to paint.

GetExtendModeX

Gets the method by which the brush horizontally tiles those areas that extend past its bitmap.

GetExtendModeY

Gets the method by which the brush vertically tiles those areas that extend past its bitmap.

GetInterpolationMode

Gets the interpolation method used when the brush bitmap is scaled or rotated.

SetBitmap

Specifies the bitmap source that this brush uses to paint.

SetExtendModeX

Specifies how the brush horizontally tiles those areas that extend past its bitmap.

SetExtendModeY

Specifies how the brush vertically tiles those areas that extend past its bitmap.

SetInterpolationMode

Specifies the interpolation mode used when the brush bitmap is scaled or rotated.

 

Remarks

A bitmap brush is used to fill a geometry with a bitmap. Like all brushes, it defines an infinite plane of content. Because bitmaps are finite, the brush relies on an "extend mode" to determine how the plane is filled horizontally and vertically.

Creating ID2D1BitmapBrush Objects

To create a bitmap brush, use the ID2D1RenderTarget::CreateBitmapBrush method.

An ID2D1BitmapBrush is a device-dependent resource: your application should create bitmap brushes after it initializes the render target with which the bitmap brush will be used, and recreate the bitmap brush whenever the render target needs recreated. (For more information about resources, see Resources Overview.)

Examples

For an example of how to create a bitmap brush, see the How to Create a Bitmap Brush topic.

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

How to Create a Bitmap Brush
Brushes Overview
Opacity Masks Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.