ID2D1DeviceContext::DrawBitmap method
Draws a bitmap to the render target.
Syntax
void DrawBitmap( [in] ID2D1Bitmap *bitmap, [in, optional] 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
- bitmap [in]
-
Type: ID2D1Bitmap*
The bitmap to draw.
- destinationRectangle [in, optional]
-
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.
- sourceRectangle [in, optional]
-
Type: const D2D1_RECT_F
An optional source rectangle.
- perspectiveTransform [in, optional]
-
Type: const D2D1_MATRIX_4X4_F
An optional perspective transform.
Return value
This method does not return a value.
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 | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps] |
|
Header |
|
|
DLL |
|
See also