ID2D1Brush interface (d2d1.h)

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

Inheritance

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

Methods

The ID2D1Brush interface has these methods.

 
ID2D1Brush::GetOpacity

Gets the degree of opacity of this brush.
ID2D1Brush::GetTransform

Gets the transform applied to this brush.
ID2D1Brush::SetOpacity

Sets the degree of opacity of this brush.
ID2D1Brush::SetTransform

Sets the transformation applied to the brush. (overload 2/2)
ID2D1Brush::SetTransform

Sets the transformation applied to the brush. (overload 1/2)

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

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1.h

See also

Brushes Overview

ID2D1Resource