ID2D1DeviceContext2::DrawGdiMetafile(ID2D1GdiMetafile*,constD2D1_RECT_F*,constD2D1_RECT_F*) method (d2d1_3.h)

Draws a metafile to the device context using the given source and destination rectangles.

Syntax

void DrawGdiMetafile(
  [in]  ID2D1GdiMetafile  *gdiMetafile,
  [ref] const D2D1_RECT_F *destinationRectangle,
  [ref] const D2D1_RECT_F *sourceRectangle
);

Parameters

[in] gdiMetafile

Type: ID2D1GdiMetafile*

The metafile to draw.

[ref] destinationRectangle

Type: const D2D1_RECT_F

The rectangle in the target where the metafile will be drawn, relative to the upper left corner (defined in DIPs) of the render target. If NULL is specified, the destination rectangle is {0, 0, w, h}, where w and h are the width and height of the metafile as reported by ID2D1GdiMetafile::GetBounds.

[ref] sourceRectangle

Type: const D2D1_RECT_F

The rectangle of the source metafile that will be drawn, relative to the upper left corner (defined in DIPs) of the metafile. If NULL is specified, the source rectangle is the value returned by ID2D1GdiMetafile1::GetSourceBounds.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps | UWP apps]
Minimum supported server Windows Server 2016 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1_3.h
DLL D2d1.dll

See also

ID2D1DeviceContext

ID2D1DeviceContext2