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

Graphics.FillPath メソッド

GraphicsPath内部塗りつぶします。

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

Public Sub FillPath ( _
    brush As Brush, _
    path As GraphicsPath _
)
Dim instance As Graphics
Dim brush As Brush
Dim path As GraphicsPath

instance.FillPath(brush, path)
public void FillPath (
    Brush brush,
    GraphicsPath path
)
public:
void FillPath (
    Brush^ brush, 
    GraphicsPath^ path
)
public void FillPath (
    Brush brush, 
    GraphicsPath path
)
public function FillPath (
    brush : Brush, 
    path : GraphicsPath
)

パラメータ

brush

塗りつぶし特性決定する Brush

path

塗りつぶし対象パスを表す GraphicsPath。

例外例外
例外種類条件

ArgumentNullException

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

または

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

解説解説
使用例使用例

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

Public Sub FillPathEllipse(ByVal
 e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New
 SolidBrush(Color.Red)

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

    ' Fill graphics path to screen.
    e.Graphics.FillPath(redBrush, graphPath)
End Sub
public void FillPathEllipse(PaintEventArgs
 e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create graphics path object and add ellipse.
    GraphicsPath graphPath = new GraphicsPath();
    graphPath.AddEllipse(0, 0, 200, 100);
             
    // Fill graphics path to screen.
    e.Graphics.FillPath(redBrush, graphPath);
}
public:
   void FillPathEllipse( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create graphics path object and add ellipse.
      GraphicsPath^ graphPath = gcnew GraphicsPath;
      graphPath->AddEllipse( 0, 0, 200, 100 );

      // Fill graphics path to screen.
      e->Graphics->FillPath( redBrush, graphPath );
   }
public void FillPathEllipse(PaintEventArgs
 e) 
{
    // Create solid brush.
    SolidBrush redBrush =  new SolidBrush(Color.get_Red());

    // Create graphics path object and add ellipse.
    GraphicsPath graphPath =  new GraphicsPath();
    graphPath.AddEllipse(0, 0, 200, 100);

    // Fill graphics path to screen.
    e.get_Graphics().FillPath(redBrush, graphPath);
} //FillPathEllipse
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2024 GRAS Group, Inc.RSS