ID2D1DeviceContext::SetUnitMode method

Sets what units will be used to interpret values passed into the device context.

Syntax

void SetUnitMode(
  D2D1_UNIT_MODE unitMode
);

Parameters

unitMode

Type: D2D1_UNIT_MODE

An enumeration defining how passed-in units will be interpreted by the device context.

Return Value

This method does not return a value.

Remarks

This method will affect all properties and parameters affected by SetDpi and GetDpi. This affects all coordinates, lengths, and other properties that are not explicitly defined as being in another unit. For example:

Requirements

   
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1_1.h
DLL D2d1.dll

See Also

D2D1_UNIT_MODE

ID2D1DeviceContext