XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

ID2D1Brush interface

Defines an object that paints an area. Interfaces that derive from ID2D1Brush describe how the area is painted.

When to implement

Custom implementations are not supported.

Members

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

Methods

The ID2D1Brush interface has these methods.

MethodDescription
GetOpacity

Gets the degree of opacity of this brush.

GetTransform

Gets the transform applied to this brush.

SetOpacity

Sets the degree of opacity of this brush.

SetTransform Overloaded.

Sets the transformation applied to the brush.

 

Remarks

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.)

Brush space in Direct2D is specified differently than in XPS and Windows Presentation Foundation (WPF). In Direct2D, brush space is not relative to the object being drawn, but rather is the current coordinate system of the render target, transformed by the brush transform, if present. To paint an object as it would be painted by a WPF brush, you must translate the brush space origin to the upper-left corner of the object's bounding box, and then scale the brush space so that the base tile fills the bounding box of the object.

For more information about brushes, see the Brushes Overview.

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

Brushes Overview
Brush Types Example

 

 

Community Additions

ADD
Show:
© 2014 Microsoft