Partager via


CRenderTarget::DrawLine

Draws a line between the specified points using the specified stroke style.

void DrawLine(
   const CD2DPointF& ptFrom,
   const CD2DPointF& ptTo,
   CD2DBrush* pBrush,
   FLOAT fStrokeWidth = 1.0,
   ID2D1StrokeStyle* strokeStyle = NULL
);

Parameters

  • ptFrom
    The start point of the line, in device-independent pixels.

  • ptTo
    The end point of the line, in device-independent pixels.

  • pBrush
    The brush used to paint the line's stroke.

  • fStrokeWidth
    A value greater than or equal to 0.0f that specifies the width of the stroke. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

  • strokeStyle
    The style of stroke to paint, or NULL to paint a solid line.

Requirements

Header: afxrendertarget.h

See Also

Reference

CRenderTarget Class