ID2D1RenderTarget::D rawEllipse (constD2D1_ELLIPSE&,ID2D1Brush*,FLOAT,ID2D1StrokeStyle*) 方法 (d2d1.h)

使用指定的筆劃樣式繪製指定橢圓形的外框。

語法

void DrawEllipse(
  const D2D1_ELLIPSE & ellipse,
  ID2D1Brush           *brush,
  FLOAT                strokeWidth,
  ID2D1StrokeStyle     *strokeStyle
);

參數

ellipse

類型:[in] const D2D1_ELLIPSE &

要繪製的橢圓形位置與半徑,以裝置無關的圖元為單位。

brush

類型:[in] ID2D1Brush*

用來繪製橢圓形外框的筆刷。

strokeWidth

類型:[in] FLOAT

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

strokeStyle

類型:[in, optional] ID2D1StrokeStyle*

要套用至橢圓形外框的筆劃樣式,或 NULL 來繪製純色筆劃。

傳回值

備註

DrawEllipse 方法不會在失敗時傳回錯誤碼。 若要判斷繪圖作業 (例如 DrawEllipse) 失敗,請檢查 ID2D1RenderTarget::EndDrawID2D1RenderTarget::Flush 方法傳回的結果。

範例

如需範例,請參閱 如何繪製和填滿基本圖形

規格需求

需求
最低支援的用戶端 適用於 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