GraphicsPath::AddClosedCurve(constPoint*,INT) メソッド (gdipluspath.h)

GraphicsPath::AddClosedCurve メソッドは、閉じたカーディナル スプラインをこのパスに追加します。

構文

Status AddClosedCurve(
  [in] const Point *points,
  [in] INT         count
);

パラメーター

[in] points

型: const Point*

カーディナル スプラインを定義するポイントの配列へのポインター。 カーディナル スプラインは、配列内の各ポイントを通過する曲線です。

[in] count

型: INT

points 配列内の要素の数を指定する整数。

戻り値

種類: 状態

メソッドが成功した場合は、 Status 列挙体の要素である Ok を返します。

メソッドが失敗した場合は、 Status 列挙体の他の要素のいずれかを返します。

注釈

これらのポイントが後で必要になる場合は、points 配列のコピーを保持する必要があります。 GraphicsPath オブジェクトには、GraphicsPath::AddClosedCurve メソッドに渡されたポイントは格納されません。代わりに、カーディナル スプラインをベジエ スプラインのシーケンスに変換し、それらのベジエ スプラインを定義する点を格納します。 GraphicsPath オブジェクトからポイントの元の配列を取得することはできません。

次の例では 、GraphicsPath オブジェクト パスを作成し、閉じたカーディナル スプラインを パスに追加し、 パスを描画します。

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

   Point pts[] = {Point(50,50),
                  Point(60,20),
                  Point(70,100),
                  Point(80,50)};

   GraphicsPath path;
   path.AddClosedCurve(pts, 4);

   // Draw the path.
   Pen pen(Color(255, 255, 0, 0));
   graphics.DrawPath(&pen, &path);
}

要件

要件
サポートされている最小のクライアント Windows XP、Windows 2000 Professional [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows 2000 Server [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー gdipluspath.h (Gdiplus.h を含む)
Library Gdiplus.lib
[DLL] Gdiplus.dll

こちらもご覧ください

AddBezier メソッド

AddBeziers メソッド

AddClosedCurve メソッド

AddCurve メソッド

カーディナル スプライン

領域でのクリッピング

パスの作成および描画

パス グラデーションの作成

カーディナル スプラインの描画

Graphicspath

パス

Point