Share via


Graphics::FillClosedCurve (constBrush*,constPointF*,INT) 方法 (gdiplusgraphics.h)

Graphics::FillClosedCurve方法會從點陣列建立封閉的基數曲線,並使用筆刷填滿曲線的內部。

語法

Status FillClosedCurve(
  const Brush  *brush,
  const PointF *points,
  INT          count
);

參數

brush

Brush物件的指標,用來繪製曲線的內部。

points

這個方法用來建立封閉基數曲線的點陣列指標。 陣列中的每個點都是曲線上的點。

count

整數,指定 陣列中的點數。

傳回值

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

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

備註

範例

下列範例會填滿封閉的基數曲線。

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

   //Create a SolidBrush object.
   SolidBrush blackBrush(Color(255, 0, 0, 0));

   //Create an array of PointF objects.
   PointF point1(100.0f, 100.0f);
   PointF point2(200.0f, 50.0f);
   PointF point3(250.0f, 200.0f);
   PointF point4(50.0f, 150.0f);
   PointF points[4] = {point1, point2, point3, point4};

   //Fill the curve.
   graphics.FillClosedCurve(&blackBrush, points, 4);
}

需求

   
標頭 gdiplusgraphics.h

另請參閱

基本曲線

繪製基數曲線

圖形

開啟與關閉的曲線

SolidBrush

筆刷和填滿的圖形