GraphicsPath::AddBezier(constPointF&,constPointF&,constPointF&,constPointF&) メソッド (gdipluspath.h)

GraphicsPath::AddBezier メソッドは、このパスの現在の図形にベジエ スプラインを追加します。

構文

Status AddBezier(
  const PointF & pt1,
  const PointF & pt2,
  const PointF & pt3,
  const PointF & pt4
);

パラメーター

pt1

ベジエ スプラインを開始する点への参照。

pt2

ベジエ スプラインの最初のコントロール ポイントである点への参照。

pt3

ベジエ スプラインの 2 番目のコントロール ポイントである点への参照。

pt4

ベジエ スプラインを終了する点への参照。

戻り値

Type:Status

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

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

解説

次の例では、 GraphicsPath オブジェクト パスを作成し、ベジェ スプラインをパスに追加し、現在の図形 (この場合は唯一の図) を閉じ、パスを描画します。

VOID Example_AddBezier(HDC hdc)
{
   Graphics graphics(hdc);
   GraphicsPath  path;

   PointF pt1(50.0f, 50.0f); 
   PointF pt2(60.0f, 20.0f);
   PointF pt3(70.0f, 100.0f); 
   PointF pt4(80.0f, 50.0f);

   path.AddBezier(pt1, pt2, pt3, pt4);
   path.CloseFigure();

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

要件

   
Header gdipluspath.h

こちらもご覧ください

AddBezier メソッド

AddBeziers メソッド

AddCurve メソッド

ベジエ スプライン

領域でのクリッピング

パスの作成および描画

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

ベジエ スプラインの描画

Graphicspath

パス

Pointf