ID2D1CommandSink::DrawImage method

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

image [in]

Type: ID2D1Image*

The image to be drawn to the command sink.

targetOffset [in, optional]

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.

imageRectangle [in, optional]

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

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

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1CommandSink
ID2D1CommandList::Stream
ID2D1DeviceContext::DrawImage

 

 

Community Additions

ADD
Show:
© 2014 Microsoft