IDWriteTextFormat::SetReadingDirection method
Sets the paragraph reading direction.
Syntax
virtual HRESULT SetReadingDirection(
DWRITE_READING_DIRECTION readingDirection
) = 0;
Parameters
- readingDirection
-
Type: DWRITE_READING_DIRECTION
The text reading direction (for example, DWRITE_READING_DIRECTION_RIGHT_TO_LEFT for languages, such as Arabic, that read from right to left) for a paragraph.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The reading direction and flow direction must always be set 90 degrees orthogonal to each other, or else you will get the error DWRITE_E_FLOWDIRECTIONCONFLICTS when you use layout functions like Draw or GetMetrics. So if you set a vertical reading direction (for example, to DWRITE_READING_DIRECTION_TOP_TO_BOTTOM), then you must also use SetFlowDirection to set the flow direction appropriately (for example, to DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT).
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 |
|
|
Library |
|
|
DLL |
|
See also