<summary>
IDWriteTextLayout::Draw calls this function to instruct the client to draw
an underline.
</summary>
<param name="clientDrawingContext">The context passed to
IDWriteTextLayout::Draw.</param>
<param name="baselineOriginX">X-coordinate of the baseline.</param>
<param name="baselineOriginY">Y-coordinate of the baseline.</param>
<param name="underline">Underline logical information.</param>
<param name="clientDrawingEffect">The drawing effect set in
IDWriteTextLayout::SetDrawingEffect.</param>
<returns>
Standard HRESULT error code.
</returns>
<remarks>
A single underline can be broken into multiple calls, depending on
how the formatting changes attributes. If font sizes/styles change
within an underline, the thickness and offset will be averaged
weighted according to characters.
To get the correct top coordinate of the underline rect, add underline::offset
to the baseline's Y. Otherwise the underline will be immediately under the text.
The x coordinate will always be passed as the left side, regardless
of text directionality. This simplifies drawing and reduces the
problem of round-off that could potentially cause gaps or a double
stamped alpha blend. To avoid alpha overlap, round the end points
to the nearest device pixel.
</remarks>
<summary> IDWriteTextLayout::Draw calls this function to instruct the client to draw an underline. </summary> <param name="clientDrawingContext">The context passed to IDWriteTextLayout::Draw.</param> <param name="baselineOriginX">X-coordinate of the baseline.</param> <param name="baselineOriginY">Y-coordinate of the baseline.</param> <param name="underline">Underline logical information.</param> <param name="clientDrawingEffect">The drawing effect set in IDWriteTextLayout::SetDrawingEffect.</param> <returns> Standard HRESULT error code. </returns> <remarks> A single underline can be broken into multiple calls, depending on how the formatting changes attributes. If font sizes/styles change within an underline, the thickness and offset will be averaged weighted according to characters. To get the correct top coordinate of the underline rect, add underline::offset to the baseline's Y. Otherwise the underline will be immediately under the text. The x coordinate will always be passed as the left side, regardless of text directionality. This simplifies drawing and reduces the problem of round-off that could potentially cause gaps or a double stamped alpha blend. To avoid alpha overlap, round the end points to the nearest device pixel. </remarks>