IDWriteTextRenderer1::DrawStrikethrough method (dwrite_2.h)
IDWriteTextLayout::Draw calls this function to instruct the client to draw a strikethrough.
Syntax
HRESULT DrawStrikethrough(
void *clientDrawingContext,
FLOAT baselineOriginX,
FLOAT baselineOriginY,
DWRITE_GLYPH_ORIENTATION_ANGLE orientationAngle,
[in] DWRITE_STRIKETHROUGH const *strikethrough,
IUnknown *clientDrawingEffect
);
Parameters
clientDrawingContext
Type: void*
The application-defined drawing context passed to IDWriteTextLayout::Draw.
baselineOriginX
Type: FLOAT
The pixel location (X-coordinate) at the baseline origin of the run where strikethrough applies.
baselineOriginY
Type: FLOAT
The pixel location (Y-coordinate) at the baseline origin of the run where strikethrough applies.
orientationAngle
Type: DWRITE_GLYPH_ORIENTATION_ANGLE
Orientation of the strikethrough.
[in] strikethrough
Type: const DWRITE_STRIKETHROUGH*
Pointer to a structure containing strikethrough logical information.
clientDrawingEffect
Type: IUnknown*
Application-defined effect to apply to the strikethrough. Usually this argument represents effects such as the foreground brush filling the interior of a line.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
A single strikethrough can be broken into multiple calls, depending on how the formatting changes attributes. Strikethrough is not averaged across font sizes/styles changes. To get an appropriate starting pixel position, add strikethrough::offset to the baseline. Like underlines, the x coordinate will always be passed as the left side, regardless of text directionality.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dwrite_2.h |
Library | Dwrite.lib |
DLL | Dwrite.dll |