ID2D1CommandSink::DrawImage method (d2d1_1.h)
Draws the provided image to the command sink.
Syntax
HRESULT DrawImage(
[in] ID2D1Image *image,
[in, optional] const D2D1_POINT_2F *targetOffset,
[in, optional] const D2D1_RECT_F *imageRectangle,
D2D1_INTERPOLATION_MODE interpolationMode,
D2D1_COMPOSITE_MODE compositeMode
);
Parameters
[in] image
Type: ID2D1Image*
The image to be drawn to the command sink.
[in, optional] targetOffset
Type: const D2D1_POINT_2F*
This defines the offset in the destination space that the image will be rendered to. The entire logical extent of the image will be rendered to the corresponding destination. If not specified, the destination origin will be (0, 0). The top-left corner of the image will be mapped to the target offset. This will not necessarily be the origin.
[in, optional] imageRectangle
Type: const D2D1_RECT_F*
The corresponding rectangle in the image space will be mapped to the provided origins when processing the image.
interpolationMode
Type: D2D1_INTERPOLATION_MODE
The interpolation mode to use to scale the image if necessary.
compositeMode
Type: D2D1_COMPOSITE_MODE
If specified, the composite mode that will be applied to the limits of the currently selected clip.
Return value
Type: HRESULT
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Remarks
Because the image can itself be a command list or contain an effect graph that in turn contains a command list, this method can result in recursive processing.
Requirements
Requirement | Value |
---|---|
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 |