Share via


ID2D1RenderTarget::D rawGeometry 方法 (d2d1.h)

使用指定的筆劃樣式繪製指定幾何的外框。

語法

void DrawGeometry(
  [in]           ID2D1Geometry    *geometry,
  [in]           ID2D1Brush       *brush,
                 FLOAT            strokeWidth,
  [in, optional] ID2D1StrokeStyle *strokeStyle
);

參數

[in] geometry

類型: ID2D1Geometry*

要繪製的幾何。

[in] brush

類型: ID2D1Brush*

用來繪製幾何筆劃的筆刷。

strokeWidth

類型: FLOAT

筆劃的寬度,以裝置無關的圖元為單位。 此值必須大於或等於0.0f。 如果未指定此參數,則預設為1.0f。 筆劃以線條為中心。

[in, optional] strokeStyle

類型: ID2D1StrokeStyle*

要套用至幾何外框的筆劃樣式,或 為NULL 繪製純色筆劃。

傳回值

備註

如果這個方法失敗,則不會傳回錯誤碼。 若要判斷繪圖作業是否 (,例如 DrawGeometry) 失敗,請檢查 ID2D1RenderTarget::EndDrawID2D1RenderTarget::Flush 方法傳回的結果。

範例

如需範例,請參閱 How to Draw and Fill a Complex Shape

規格需求

需求
最低支援的用戶端 適用於 Windows Vista 的 Windows 7、Windows Vista SP2 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 d2d1.h
程式庫 D2d1.lib
Dll D2d1.dll

另請參閱

幾何

幾何概觀

ID2D1RenderTarget