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

Graphics.DrawPath メソッド

GraphicsPath描画ます。

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

Public Sub DrawPath ( _
    pen As Pen, _
    path As GraphicsPath _
)
Dim instance As Graphics
Dim pen As Pen
Dim path As GraphicsPath

instance.DrawPath(pen, path)
public void DrawPath (
    Pen pen,
    GraphicsPath path
)
public:
void DrawPath (
    Pen^ pen, 
    GraphicsPath^ path
)
public void DrawPath (
    Pen pen, 
    GraphicsPath path
)
public function DrawPath (
    pen : Pen, 
    path : GraphicsPath
)

パラメータ

pen

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

path

描画する GraphicsPath。

例外例外
例外種類条件

ArgumentNullException

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

または

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

解説解説
使用例使用例

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

Public Sub DrawPathEllipse(ByVal
 e As PaintEventArgs)

    ' Create graphics path object and add ellipse.
    Dim graphPath As New
 GraphicsPath
    graphPath.AddEllipse(0, 0, 200, 100)

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

    ' Draw graphics path to screen.
    e.Graphics.DrawPath(blackPen, graphPath)
End Sub
public void DrawPathEllipse(PaintEventArgs
 e)
{
             
    // Create graphics path object and add ellipse.
    GraphicsPath graphPath = new GraphicsPath();
    graphPath.AddEllipse(0, 0, 200, 100);
             
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Draw graphics path to screen.
    e.Graphics.DrawPath(blackPen, graphPath);
}
public:
   void DrawPathEllipse( PaintEventArgs^ e )
   {
      // Create graphics path object and add ellipse.
      GraphicsPath^ graphPath = gcnew GraphicsPath;
      graphPath->AddEllipse( 0, 0, 200, 100 );

      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Draw graphics path to screen.
      e->Graphics->DrawPath( blackPen, graphPath );
   }
public void DrawPathEllipse(PaintEventArgs
 e) 
{
    // Create graphics path object and add ellipse.
    GraphicsPath graphPath =  new GraphicsPath();
    graphPath.AddEllipse(0, 0, 200, 100);

    // Create pen.
    Pen blackPen =  new Pen(Color.get_Black(), 3);

    // Draw graphics path to screen.
    e.get_Graphics().DrawPath(blackPen, graphPath);
} //DrawPathEllipse
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からGraphics.DrawPath メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からGraphics.DrawPath メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からGraphics.DrawPath メソッド を検索

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

辞書ショートカット

すべての辞書の索引

「Graphics.DrawPath メソッド」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS