D2D1_UNIT_MODE Enumeration

Specifies how units in Direct2D will be interpreted.

Syntax

typedef enum D2D1_UNIT_MODE {
  D2D1_UNIT_MODE_DIPS         ,
  D2D1_UNIT_MODE_PIXELS       ,
  D2D1_UNIT_MODE_FORCE_DWORD
} ;

Constants

D2D1_UNIT_MODE_DIPS Units will be interpreted as device-independent pixels (1/96").
D2D1_UNIT_MODE_PIXELS Units will be interpreted as pixels.
D2D1_UNIT_MODE_FORCE_DWORD

Remarks

Setting the unit mode to D2D1_UNIT_MODE_PIXELS is similar to setting the ID2D1DeviceContext dots per inch (dpi) to 96. However, Direct2D still checks the dpi to determine the threshold for enabling vertical antialiasing for text, and when the unit mode is restored, the dpi will be remembered.

Requirements

   
Windows version Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Header d2d1_1.h

See Also

ID2D1DeviceContext::GetUnitMode

ID2D1DeviceContext::SetUnitMode