Share via


IDWriteTextRenderer::DrawStrikethrough Method

IDWriteTextLayout::Draw calls this function to instruct the client to draw a strikethrough.

Syntax

virtual HRESULT DrawStrikethrough(
  void * clientDrawingContext,
  FLOAT  baselineOriginX,
  FLOAT  baselineOriginY,
  [in]  const DWRITE_STRIKETHROUGH * strikethrough,
  IUnknown * clientDrawingEffect
) = 0;

Parameter

  • clientDrawingContext
    The application-defined drawing context passed to IDWriteTextLayout::Draw.

  • baselineOriginX
    The pixel location (X-coordinate) at the baseline origin of the run where strikethrough applies.

  • baselineOriginY
    The pixel location (Y-coordinate) at the baseline origin of the run where strikethrough applies.

  • strikethrough [in]
    Pointer to a structure containing strikethrough logical information.

  • clientDrawingEffect
    Application-defined effect to apply to the strikethrough. Usually this argument represents effects such as the foreground brush filling the interior of a line.

Rückgabewert

Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.

Hinweise

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.

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

Siehe auch

IDWriteTextRenderer