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 |