ID2D1DeviceContext::DrawBitmap(ID2D1Bitmap*,constD2D1_RECT_F*,FLOAT,D2D1_INTERPOLATION_MODE,constD2D1_RECT_F*,constD2D1_MATRIX_4X4_F*) method (d2d1_1.h)
Draws a bitmap to the render target.
Syntax
void DrawBitmap(
[in] ID2D1Bitmap *bitmap,
[in, optional] const D2D1_RECT_F *destinationRectangle,
FLOAT opacity,
D2D1_INTERPOLATION_MODE interpolationMode,
[in, optional] const D2D1_RECT_F *sourceRectangle,
[in, optional] const D2D1_MATRIX_4X4_F *perspectiveTransform
);
Parameters
[in] bitmap
Type: ID2D1Bitmap*
The bitmap to draw.
[in, optional] destinationRectangle
Type: D2D1_RECT_F*
The destination rectangle. The default is the size of the bitmap and the location is the upper left corner of the render target.
opacity
Type: FLOAT
The opacity of the bitmap.
interpolationMode
Type: D2D1_INTERPOLATION_MODE
The interpolation mode to use.
[in, optional] sourceRectangle
Type: const D2D1_RECT_F
An optional source rectangle.
[in, optional] perspectiveTransform
Type: const D2D1_MATRIX_4X4_F
An optional perspective transform.
Return value
None
Remarks
The destinationRectangle parameter defines the rectangle in the target where the bitmap will appear (in device-independent pixels (DIPs)). This is affected by the currently set transform and the perspective transform, if set. If NULL is specified, then the destination rectangle is (left=0, top=0, right = width(sourceRectangle), bottom = height(sourceRectangle)).
The sourceRectangle parameter defines the sub-rectangle of the source bitmap (in DIPs). DrawBitmap will clip this rectangle to the size of the source bitmap, thus making it impossible to sample outside of the bitmap. If NULL is specified, then the source rectangle is taken to be the size of the source bitmap.
If you specify perspectiveTransform it is applied to the rect in addition to the transform set on the render target.
Requirements
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d2d1_1.h |
DLL | D2d1.dll |
See also
Feedback
Submit and view feedback for