Graphics.DrawBezier メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Graphics.DrawBezier メソッドの意味・解説 

Graphics.DrawBezier メソッド (Pen, Point, Point, Point, Point)

4 つPoint 構造体定義されるベジエ スプライン描画ます。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub DrawBezier ( _
    pen As Pen, _
    pt1 As Point, _
    pt2 As Point, _
    pt3 As Point, _
    pt4 As Point _
)
Dim instance As Graphics
Dim pen As Pen
Dim pt1 As Point
Dim pt2 As Point
Dim pt3 As Point
Dim pt4 As Point

instance.DrawBezier(pen, pt1, pt2, pt3, pt4)
public void DrawBezier (
    Pen pen,
    Point pt1,
    Point pt2,
    Point pt3,
    Point pt4
)
public:
void DrawBezier (
    Pen^ pen, 
    Point pt1, 
    Point pt2, 
    Point pt3, 
    Point pt4
)
public void DrawBezier (
    Pen pen, 
    Point pt1, 
    Point pt2, 
    Point pt3, 
    Point pt4
)
public function DrawBezier (
    pen : Pen, 
    pt1 : Point, 
    pt2 : Point, 
    pt3 : Point, 
    pt4 : Point
)

パラメータ

pen

曲線の色、幅、およびスタイル決定する Pen 構造体

pt1

曲線開始点を表す Point 構造体

pt2

曲線最初制御点を表す Point 構造体

pt3

曲線2 番目の制御点を表す Point 構造体

pt4

曲線終了点を表す Point 構造体

例外例外
例外種類条件

ArgumentNullException

pennull 参照 (Visual Basic では Nothing) です。

解説解説

ベジエ曲線は、最初の点から 4 番目の点にかけて描画されます。2 番目と 3 番目の点は、曲線の形状決定する制御点です。

使用例使用例

次の例は、Windows フォームでの使用意図してデザインされており、Paint イベント ハンドラパラメータである PaintEventArgse が必要です。このコード次のアクション実行します

Public Sub DrawBezierPoint(ByVal
 e As PaintEventArgs)

    ' Create pen.
    Dim blackPen As New
 Pen(Color.Black, 3)

    ' Create points for curve.
    Dim start As New Point(100,
 100)
    Dim control1 As New
 Point(200, 10)
    Dim control2 As New
 Point(350, 50)
    Dim [end] As New Point(500,
 100)

    ' Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, [end])
End Sub
public void DrawBezierPoint(PaintEventArgs
 e)
{
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Create points for curve.
    Point start = new Point(100, 100);
    Point control1 = new Point(200, 10);
    Point control2 = new Point(350, 50);
    Point end = new Point(500, 100);
             
    // Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, end);
}
public:
   void DrawBezierPoint( PaintEventArgs^ e )
   {
      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Create points for curve.
      Point start = Point(100,100);
      Point control1 = Point(200,10);
      Point control2 = Point(350,50);
      Point end = Point(500,100);

      // Draw arc to screen.
      e->Graphics->DrawBezier( blackPen, start, control1, control2, end );
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.DrawBezier メソッド (Pen, PointF, PointF, PointF, PointF)

4 つPointF 構造体定義されるベジエ スプライン描画ます。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub DrawBezier ( _
    pen As Pen, _
    pt1 As PointF, _
    pt2 As PointF, _
    pt3 As PointF, _
    pt4 As PointF _
)
Dim instance As Graphics
Dim pen As Pen
Dim pt1 As PointF
Dim pt2 As PointF
Dim pt3 As PointF
Dim pt4 As PointF

instance.DrawBezier(pen, pt1, pt2, pt3, pt4)
public void DrawBezier (
    Pen pen,
    PointF pt1,
    PointF pt2,
    PointF pt3,
    PointF pt4
)
public:
void DrawBezier (
    Pen^ pen, 
    PointF pt1, 
    PointF pt2, 
    PointF pt3, 
    PointF pt4
)
public void DrawBezier (
    Pen pen, 
    PointF pt1, 
    PointF pt2, 
    PointF pt3, 
    PointF pt4
)
public function DrawBezier (
    pen : Pen, 
    pt1 : PointF, 
    pt2 : PointF, 
    pt3 : PointF, 
    pt4 : PointF
)

パラメータ

pen

曲線の色、幅、およびスタイル決定する Pen

pt1

曲線開始点を表す PointF 構造体

pt2

曲線最初制御点を表す PointF 構造体

pt3

曲線2 番目の制御点を表す PointF 構造体

pt4

曲線終了点を表す PointF 構造体

例外例外
例外種類条件

ArgumentNullException

pennull 参照 (Visual Basic では Nothing) です。

解説解説

ベジエ スプラインは、最初の点から 4 番目の点にかけて描画されます。2 番目と 3 番目の点は、曲線の形状決定する制御点です。

使用例使用例

次の例は、Windows フォームでの使用意図してデザインされており、Paint イベント ハンドラパラメータである PaintEventArgse が必要です。このコード次のアクション実行します

Public Sub DrawBezierPointF(ByVal
 e As PaintEventArgs)

    ' Create pen.
    Dim blackPen As New
 Pen(Color.Black, 3)

    ' Create points for curve.
    Dim start As New PointF(100.0F,
 100.0F)
    Dim control1 As New
 PointF(200.0F, 10.0F)
    Dim control2 As New
 PointF(350.0F, 50.0F)
    Dim [end] As New PointF(500.0F,
 100.0F)

    ' Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, [end])
End Sub
public void DrawBezierPointF(PaintEventArgs
 e)
{
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Create points for curve.
    PointF start = new PointF(100.0F, 100.0F);
    PointF control1 = new PointF(200.0F, 10.0F);
    PointF control2 = new PointF(350.0F, 50.0F);
    PointF end = new PointF(500.0F, 100.0F);
             
    // Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, end);
}
public:
   void DrawBezierPointF( PaintEventArgs^ e )
   {
      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Create points for curve.
      PointF start = PointF(100.0F,100.0F);
      PointF control1 = PointF(200.0F,10.0F);
      PointF control2 = PointF(350.0F,50.0F);
      PointF end = PointF(500.0F,100.0F);

      // Draw arc to screen.
      e->Graphics->DrawBezier( blackPen, start, control1, control2, end );
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.DrawBezier メソッド


Graphics.DrawBezier メソッド (Pen, Single, Single, Single, Single, Single, Single, Single, Single)

各点を表す 4 つ順序付けられた座標ペア定義されるベジエ スプライン描画ます。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub DrawBezier ( _
    pen As Pen, _
    x1 As Single, _
    y1 As Single, _
    x2 As Single, _
    y2 As Single, _
    x3 As Single, _
    y3 As Single, _
    x4 As Single, _
    y4 As Single _
)
Dim instance As Graphics
Dim pen As Pen
Dim x1 As Single
Dim y1 As Single
Dim x2 As Single
Dim y2 As Single
Dim x3 As Single
Dim y3 As Single
Dim x4 As Single
Dim y4 As Single

instance.DrawBezier(pen, x1, y1, x2, y2, x3, y3, x4, y4)
public void DrawBezier (
    Pen pen,
    float x1,
    float y1,
    float x2,
    float y2,
    float x3,
    float y3,
    float x4,
    float y4
)
public:
void DrawBezier (
    Pen^ pen, 
    float x1, 
    float y1, 
    float x2, 
    float y2, 
    float x3, 
    float y3, 
    float x4, 
    float y4
)
public void DrawBezier (
    Pen pen, 
    float x1, 
    float y1, 
    float x2, 
    float y2, 
    float x3, 
    float y3, 
    float x4, 
    float y4
)
public function DrawBezier (
    pen : Pen, 
    x1 : float, 
    y1 : float, 
    x2 : float, 
    y2 : float, 
    x3 : float, 
    y3 : float, 
    x4 : float, 
    y4 : float
)

パラメータ

pen

曲線の色、幅、およびスタイル決定する Pen

x1

曲線開始点の x 座標

y1

曲線開始点の y 座標

x2

曲線最初制御点の x 座標

y2

曲線最初制御点の y 座標

x3

曲線2 番目の制御点の x 座標

y3

曲線2 番目の制御点の y 座標

x4

曲線終了点の x 座標

y4

曲線終了点の y 座標

例外例外
例外種類条件

ArgumentNullException

pennull 参照 (Visual Basic では Nothing) です。

解説解説

ベジエ スプラインは、最初の点から 4 番目の点にかけて描画されます。2 番目と 3 番目の点は、曲線の形状決定する制御点です。

使用例使用例

次の例は、Windows フォームでの使用意図してデザインされており、Paint イベント ハンドラパラメータである PaintEventArgse が必要です。このコード次のアクション実行します

' Begin Example03.
Public Sub DrawBezierFloat(ByVal
 e As PaintEventArgs)

    ' Create pen.
    Dim blackPen As New
 Pen(Color.Black, 3)

    ' Create coordinates of points for curve.
    Dim startX As Single
 = 100.0F
    Dim startY As Single
 = 100.0F
    Dim controlX1 As Single
 = 200.0F
    Dim controlY1 As Single
 = 10.0F
    Dim controlX2 As Single
 = 350.0F
    Dim controlY2 As Single
 = 50.0F
    Dim endX As Single =
 500.0F
    Dim endY As Single =
 100.0F

    ' Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, startX, startY, controlX1, _
    controlY1, controlX2, controlY2, endX, endY)
End Sub
public void DrawBezierFloat(PaintEventArgs
 e)
{
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Create coordinates of points for curve.
    float startX = 100.0F;
    float startY = 100.0F;
    float controlX1 = 200.0F;
    float controlY1 =  10.0F;
    float controlX2 = 350.0F;
    float controlY2 =  50.0F;
    float endX = 500.0F;
    float endY = 100.0F;
             
    // Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, startX, startY,
        controlX1, controlY1,
        controlX2, controlY2,
        endX, endY);
}
public:
   void DrawBezierFloat( PaintEventArgs^ e )
   {
      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Create coordinates of points for curve.
      float startX = 100.0F;
      float startY = 100.0F;
      float controlX1 = 200.0F;
      float controlY1 = 10.0F;
      float controlX2 = 350.0F;
      float controlY2 = 50.0F;
      float endX = 500.0F;
      float endY = 100.0F;

      // Draw arc to screen.
      e->Graphics->DrawBezier( blackPen, startX, startY, controlX1, controlY1,
 controlX2, controlY2, endX, endY );
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Graphics.DrawBezier メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Graphics.DrawBezier メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS