ID2D1DeviceContext::SetUnitMode method (d2d1_1.h)
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
None
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:
- SetUnitMode will affect a coordinate passed into ID2D1DeviceContext::DrawLine, and the scaling of a geometry passed into ID2D1DeviceContext::FillGeometry.
- SetUnitMode will not affect the value returned by ID2D1Bitmap::GetPixelSize.
Requirements
Requirement | Value |
---|---|
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 |