IDWriteFactory::CreateGdiCompatibleTextLayout Method
Takes a string, format, and associated constraints, and produces an object representing the result, formatted for a particular display resolution and measuring mode.
Syntax
virtual HRESULT CreateGdiCompatibleTextLayout(
[in] const WCHAR * string,
UINT32 stringLength,
IDWriteTextFormat * textFormat,
FLOAT layoutWidth,
FLOAT layoutHeight,
FLOAT pixelsPerDip,
[in, optional] const DWRITE_MATRIX * transform,
BOOL useGdiNatural,
[out] IDWriteTextLayout ** textLayout
) = 0;
Parameter
string [in]
An array of characters that contains the string to create a new IDWriteTextLayout object from. This array must be of length stringLength and can contain embedded NULL characters.stringLength
The length of the string, in character count.textFormat
The text formatting object to apply to the string.layoutWidth
The width of the layout box.layoutHeight
The height of the layout box.pixelsPerDip
The number of physical pixels per DIP (device independent pixel). For example, if rendering onto a 96 DPI device pixelsPerDip is 1. If rendering onto a 120 DPI device pixelsPerDip is 1.25 (120/96).transform [in, optional]
An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specifies the font size and pixels per DIP.useGdiNatural
Instructs the text layout to use the same metrics as GDI bi-level text when set to FALSE. When set to TRUE, instructs the text layout to use the same metrics as text measured by GDI using a font created with CLEARTYPE_NATURAL_QUALITY.textLayout [out]
When this method returns, contains an address to the pointer of the resultant text layout object.
Rückgabewert
Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.
Hinweise
The resulting text layout should only be used for the intended resolution, and for cases where text scalability is desired CreateTextLayout should be used instead.
Anforderungen
Mindestens unterstützter Client |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista |
Mindestens unterstützter Server |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 |
Header |
Dwrite.h |
Bibliothek |
Dwrite.lib |
DLL |
Dwrite.dll |