Graphics::D rawBezier(constPen*,constPointF&,constPointF&,constPointF&,constPointF&) メソッド (gdiplusgraphics.h)
Graphics::D rawBezier メソッドは、ベジエ スプラインを描画します。
構文
Status DrawBezier(
[in] const Pen *pen,
[in, ref] const PointF & pt1,
[in, ref] const PointF & pt2,
[in, ref] const PointF & pt3,
[in, ref] const PointF & pt4
);
パラメーター
[in] pen
種類: const Pen*
ベジエ スプラインの描画に使用されるペンへのポインター。
[in, ref] pt1
型: const POINTF
ベジエ スプラインの始点への参照。
[in, ref] pt2
型: const POINTF
ベジエ スプラインの最初のコントロール ポイントへの参照。
[in, ref] pt3
型: const POINTF
ベジエ スプラインの 2 番目のコントロール ポイントへの参照。
[in, ref] pt4
型: const POINTF
ベジエ スプラインの終点への参照。
戻り値
種類: 状態
メソッドが成功した場合は、 Status 列挙体の要素である Ok を返します。
メソッドが失敗した場合は、 Status 列挙体の他の要素のいずれかを返します。
注釈
ベジエ スプラインは、コントロール ポイントを通過しません。 コントロール ポイントは磁石として機能し、ベジェ スプラインの曲げ方に影響を与えるために特定の方向に曲線を引っ張ります。
例
次の例では、ベジエ曲線を描画します。
VOID Example_DrawBezier2(HDC hdc)
{
Graphics graphics(hdc);
// Set up the pen and curve points.
Pen greenPen(Color(255, 0, 255, 0));
PointF startPoint(100.0f, 100.0f);
PointF controlPoint1(200.0f, 10.0f);
PointF controlPoint2(350.0f, 50.0f);
PointF endPoint(500.0f, 100.0f);
//Draw the curve.
graphics.DrawBezier(&greenPen, startPoint, controlPoint1, controlPoint2, endPoint);
//Draw the end points and control points.
SolidBrush redBrush(Color(255, 255, 0, 0));
SolidBrush blueBrush(Color(255, 0, 0, 255));
graphics.FillEllipse(&redBrush, 100 - 5, 100 - 5, 10, 10);
graphics.FillEllipse(&redBrush, 500 - 5, 100 - 5, 10, 10);
graphics.FillEllipse(&blueBrush, 200 - 5, 10 - 5, 10, 10);
graphics.FillEllipse(&blueBrush, 350 - 5, 50 - 5, 10, 10);
}
要件
要件 | 値 |
---|---|
サポートされている最小のクライアント | Windows XP、Windows 2000 Professional [デスクトップ アプリのみ] |
サポートされている最小のサーバー | Windows 2000 Server [デスクトップ アプリのみ] |
対象プラットフォーム | Windows |
ヘッダー | gdiplusgraphics.h (Gdiplus.h を含む) |
Library | Gdiplus.lib |
[DLL] | Gdiplus.dll |
こちらもご覧ください
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示