ID2D1CommandSink::D rawRectangle 方法 (d2d1_1.h)

绘制矩形。

语法

HRESULT DrawRectangle(
  [in]           const D2D1_RECT_F *rect,
  [in]           ID2D1Brush        *brush,
                 FLOAT             strokeWidth,
  [in, optional] ID2D1StrokeStyle  *strokeStyle
);

参数

[in] rect

类型: const D2D1_RECT_F*

要绘制到命令接收器的矩形。

[in] brush

类型: ID2D1Brush*

用于绘制几何图形的画笔。

strokeWidth

类型: FLOAT

笔划的宽度。

[in, optional] strokeStyle

类型: ID2D1StrokeStyle*

笔划的样式。

返回值

类型: HRESULT

如果该方法成功,则返回 S_OK。 如果失败,则返回 HRESULT 错误代码。

要求

要求
最低受支持的客户端 适用于 Windows 7 的Windows 8和平台更新 [桌面应用 |UWP 应用]
最低受支持的服务器 适用于 Windows Server 2008 R2 的Windows Server 2012和平台更新 [桌面应用 |UWP 应用]
目标平台 Windows
标头 d2d1_1.h
DLL D2d1.dll

另请参阅

ID2D1CommandList::Stream

ID2D1CommandSink

ID2D1RenderTarget::D rawRectangle