Graphics::D rawEllipse (constPen*,constRectF&) 方法 (gdiplusgraphics.h)

Graphics::D rawEllipse 方法會繪製橢圓形。

語法

Status DrawEllipse(
  const Pen     *pen,
  const RectF & rect
);

參數

pen

用來繪製橢圓形的畫筆指標。

rect

系結橢圓形的矩形參考。

傳回值

如果方法成功,它會傳回 Ok,這是 Status 列舉的元素。

如果方法失敗,它會傳回 Status 列舉的其他其中一個專案。

備註

範例

下列範例會繪製橢圓形。

VOID Example_DrawEllipse2(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a Pen object.
   Pen bluePen(Color(255, 0, 0, 255));

   // Create a Rect object that bounds the ellipse.
   RectF ellipseRect(0.0f, 0.0f, 200.0f, 100.0f);

   // Draw the ellipse.
   graphics.DrawEllipse(&bluePen, ellipseRect);
}

規格需求

   
標頭 gdiplusgraphics.h

另請參閱

圖形

FillEllipse 方法

RectF

橢圓形和弧形