Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ID2D1RenderTarget::CreateBitmapBrush(ID2D1Bitmap*,ID2D1BitmapBrush**) method (d2d1.h)
Creates an ID2D1BitmapBrush from the specified bitmap. The brush uses the default values for its extend mode, interpolation mode, opacity, and transform.
Syntax
HRESULT CreateBitmapBrush(
[in] ID2D1Bitmap *bitmap,
[out] ID2D1BitmapBrush **bitmapBrush
);
Parameters
[in] bitmap
Type: ID2D1Bitmap*
The bitmap contents of the new brush.
[out] bitmapBrush
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.
Remarks
The bitmap brush created by this method has D2D1_EXTEND_MODE_CLAMP horizontal and vertical extend modes and the D2D1_BITMAP_INTERPOLATION_MODE_LINEAR interpolation mode. Its opacity is 1.0f, and its transform is the identity matrix.
Examples
For an example showing how to paint an area with a bitmap brush, see How to Create a Bitmap Brush.
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 |
| Library | D2d1.lib |
| DLL | D2d1.dll |
See also
Feedback
Was this page helpful?
