ID2D1CommandSink5::BlendImage method (d2d1_3.h)

Draws an image to the device context using the specified blend mode. Results are equivalent to using Direct2D's built-in Blend effect.

Syntax

HRESULT BlendImage(
  [in]           ID2D1Image              *image,
                 D2D1_BLEND_MODE         blendMode,
  [in, optional] const D2D1_POINT_2F     *targetOffset,
  [in, optional] const D2D1_RECT_F       *imageRectangle,
                 D2D1_INTERPOLATION_MODE interpolationMode
);

Parameters

[in] image

Type: ID2D1Image*

The image to be drawn to the device context.

blendMode

Type: D2D1_BLEND_MODE

The blend mode to be used. See Blend modes for more info.

[in, optional] targetOffset

Type: const D2D1_POINT_2F*

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. The default value is NULL.

[in, optional] imageRectangle

Type: const D2D1_RECT_F*

The corresponding rectangle in the image space will be mapped to the given origins when processing the image. The default value is NULL.

interpolationMode

Type: D2D1_INTERPOLATION_MODE

The interpolation mode that will be used to scale the image if necessary. The default value is D2D1_INTERPOLATION_MODE_LINEAR.

Return value

Type: HRESULT

This method returns an HRESULT success or error code.

Requirements

Requirement Value
Target Platform Windows
Header d2d1_3.h
DLL D2d1.dll

See also

ID2D1CommandSink5