Expand Minimize

ID2D1RenderTarget::SetDpi method

Sets the dots per inch (DPI) of the render target.

Syntax


virtual void SetDpi(
  FLOAT dpiX,
  FLOAT dpiY
) = 0;

Parameters

dpiX

Type: FLOAT

A value greater than or equal to zero that specifies the horizontal DPI of the render target.

dpiY

Type: FLOAT

A value greater than or equal to zero that specifies the vertical DPI of the render target.

Return value

This method does not return a value.

Remarks

This method specifies the mapping from pixel space to device-independent space for the render target. If both dpiX and dpiY are 0, the factory-read system DPI is chosen. If one parameter is zero and the other unspecified, the DPI is not changed.

For ID2D1HwndRenderTarget, the DPI defaults to the most recently factory-read system DPI. The default value for all other render targets is 96 DPI.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget

 

 

Community Additions

ADD
Show:
© 2015 Microsoft