CRenderTarget::DrawLine

使用指定的笔画样式在两个指定点之间绘制一条线。

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

参数

  • ptFrom
    线条的起点(以与设备无关的像素为单位)。

  • ptTo
    该线条的终点(以与设备无关的像素为单位)。

  • pBrush
    用于绘制线条笔画的的画笔。

  • fStrokeWidth
    大于等于 0.0f 的指定该笔画宽度的值。 如果未指定此参数,则默认为 1.0f。 笔画在线条上居中显示。

  • strokeStyle
    要绘制的笔画样式,或者为 NULL 以绘制实线。

要求

标头: afxrendertarget.h

请参见

参考

CRenderTarget 类