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:
- 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
|
Minimum supported client |
Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps] |
|
Header |
|
|
DLL |
|
See also