[]
IDWriteTextLayout::Draw calls this function to instruct the client to draw a strikethrough.
public override HResult DrawStrikethrough(object clientDrawingContext, float baselineOriginX, float baselineOriginY, ref Strikethrough strikethrough, IntPtr clientDrawingEffectPtr)
Public Overrides Function DrawStrikethrough(clientDrawingContext As Object, baselineOriginX As Single, baselineOriginY As Single, ByRef strikethrough As Strikethrough, clientDrawingEffectPtr As IntPtr) As HResult
| Type | Name | Description |
|---|---|---|
| object | clientDrawingContext | |
| float | baselineOriginX | |
| float | baselineOriginY | |
| Strikethrough | strikethrough | |
| IntPtr | clientDrawingEffectPtr |
| Type | Description |
|---|---|
| HResult |
IDWriteTextLayout::Draw calls this function to instruct the client to draw a strikethrough.
public virtual HResult DrawStrikethrough(object clientDrawingContext, float baselineOriginX, float baselineOriginY, GlyphOrientationAngle orientationAngle, ref Strikethrough strikethrough, IntPtr clientDrawingEffectPtr)
Public Overridable Function DrawStrikethrough(clientDrawingContext As Object, baselineOriginX As Single, baselineOriginY As Single, orientationAngle As GlyphOrientationAngle, ByRef strikethrough As Strikethrough, clientDrawingEffectPtr As IntPtr) As HResult
| Type | Name | Description |
|---|---|---|
| object | clientDrawingContext | The application-defined drawing context passed to IDWriteTextLayout::Draw. |
| float | baselineOriginX | The pixel location (X-coordinate) at the baseline origin of the run where strikethrough applies. |
| float | baselineOriginY | The pixel location (Y-coordinate) at the baseline origin of the run where strikethrough applies. |
| GlyphOrientationAngle | orientationAngle | Orientation of the strikethrough. |
| Strikethrough | strikethrough | Pointer to a structure containing strikethrough logical information. |
| IntPtr | clientDrawingEffectPtr | Application-defined effect to apply to the strikethrough. Usually this argument represents effects such as the foreground brush filling the interior of a line. |
| Type | Description |
|---|---|
| HResult | If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. |
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.