Graphics.FillPieとは? わかりやすく解説

Graphics.FillPie メソッド (Brush, Single, Single, Single, Single, Single, Single)

座標ペア、幅、および高さで指定され楕円と 2 本の半径によって定義される扇形内部塗りつぶします。

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

Public Sub FillPie ( _
    brush As Brush, _
    x As Single, _
    y As Single, _
    width As Single, _
    height As Single, _
    startAngle As Single, _
    sweepAngle As Single _
)
Dim instance As Graphics
Dim brush As Brush
Dim x As Single
Dim y As Single
Dim width As Single
Dim height As Single
Dim startAngle As Single
Dim sweepAngle As Single

instance.FillPie(brush, x, y, width, height, startAngle, sweepAngle)
public void FillPie (
    Brush brush,
    float x,
    float y,
    float width,
    float height,
    float startAngle,
    float sweepAngle
)
public:
void FillPie (
    Brush^ brush, 
    float x, 
    float y, 
    float width, 
    float height, 
    float startAngle, 
    float sweepAngle
)
public void FillPie (
    Brush brush, 
    float x, 
    float y, 
    float width, 
    float height, 
    float startAngle, 
    float sweepAngle
)
public function FillPie (
    brush : Brush, 
    x : float, 
    y : float, 
    width : float, 
    height : float, 
    startAngle : float, 
    sweepAngle : float
)

パラメータ

brush

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

x

扇形の元となる楕円定義する外接する四角形左上隅の x 座標

y

扇形の元となる楕円定義する外接する四角形左上隅の y 座標

width

扇形の元となる楕円定義する外接する四角形の幅。

height

扇形の元となる楕円定義する外接する四角形の高さ。

startAngle

x 軸から扇形最初の辺まで、時計回り測定した角度 (度単位)。

sweepAngle

startAngle パラメータから扇形2 番目の辺まで、時計回り測定した角度 (度単位)。

例外例外
例外種類条件

ArgumentNullException

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

解説解説
使用例使用例

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

Public Sub FillPieFloat(ByVal
 e As PaintEventArgs)

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

    ' Create location and size of ellipse.
    Dim x As Single = 0.0F
    Dim y As Single = 0.0F
    Dim width As Single
 = 200.0F
    Dim height As Single
 = 100.0F

    ' Create start and sweep angles.
    Dim startAngle As Single
 = 0.0F
    Dim sweepAngle As Single
 = 45.0F

    ' Fill pie to screen.
    e.Graphics.FillPie(redBrush, x, y, width, height, startAngle, _
    sweepAngle)
End Sub
public void FillPieFloat(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create location and size of ellipse.
    float x = 0.0F;
    float y = 0.0F;
    float width = 200.0F;
    float height = 100.0F;
             
    // Create start and sweep angles.
    float startAngle =  0.0F;
    float sweepAngle = 45.0F;
             
    // Fill pie to screen.
    e.Graphics.FillPie(redBrush, x, y, width, height, startAngle, sweepAngle);
}
public:
   void FillPieFloat( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create location and size of ellipse.
      float x = 0.0F;
      float y = 0.0F;
      float width = 200.0F;
      float height = 100.0F;

      // Create start and sweep angles.
      float startAngle = 0.0F;
      float sweepAngle = 45.0F;

      // Fill pie to screen.
      e->Graphics->FillPie( redBrush, x, y, width, height, startAngle, sweepAngle
 );
   }
public void FillPieFloat(PaintEventArgs e)
 
{
    // Create solid brush.
    SolidBrush redBrush =  new SolidBrush(Color.get_Red());

    // Create location and size of ellipse.
    float x = 0;
    float y = 0;
    float width = 200;
    float height = 100;

    // Create start and sweep angles.
    float startAngle = 0;
    float sweepAngle = 45;

    // Fill pie to screen.
    e.get_Graphics().FillPie(redBrush, x, y, width, height, startAngle, 
        sweepAngle);
} //FillPieFloat
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPie メソッド (Brush, Rectangle, Single, Single)

RectangleF 構造体と 2 本の半径によって指定され楕円定義される扇形内部塗りつぶします。

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

Public Sub FillPie ( _
    brush As Brush, _
    rect As Rectangle, _
    startAngle As Single, _
    sweepAngle As Single _
)
Dim instance As Graphics
Dim brush As Brush
Dim rect As Rectangle
Dim startAngle As Single
Dim sweepAngle As Single

instance.FillPie(brush, rect, startAngle, sweepAngle)
public void FillPie (
    Brush brush,
    Rectangle rect,
    float startAngle,
    float sweepAngle
)
public:
void FillPie (
    Brush^ brush, 
    Rectangle rect, 
    float startAngle, 
    float sweepAngle
)
public void FillPie (
    Brush brush, 
    Rectangle rect, 
    float startAngle, 
    float sweepAngle
)
public function FillPie (
    brush : Brush, 
    rect : Rectangle, 
    startAngle : float, 
    sweepAngle : float
)

パラメータ

brush

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

rect

扇形の元となる楕円定義する外接する四角形を表す Rectangle 構造体

startAngle

x 軸から扇形最初の辺まで、時計回り測定した角度 (度単位)。

sweepAngle

startAngle パラメータから扇形2 番目の辺まで、時計回り測定した角度 (度単位)。

例外例外
例外種類条件

ArgumentNullException

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

解説解説
使用例使用例

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

Public Sub FillPieRectangle(ByVal
 e As PaintEventArgs)

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

    ' Create rectangle for ellipse.
    Dim rect As New Rectangle(0,
 0, 200, 100)

    ' Create start and sweep angles.
    Dim startAngle As Single
 = 0.0F
    Dim sweepAngle As Single
 = 45.0F

    ' Fill pie to screen.
    e.Graphics.FillPie(redBrush, rect, startAngle, sweepAngle)
End Sub
public void FillPieRectangle(PaintEventArgs
 e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create rectangle for ellipse.
    Rectangle rect = new Rectangle(0, 0, 200, 100);
             
    // Create start and sweep angles.
    float startAngle =  0.0F;
    float sweepAngle = 45.0F;
             
    // Fill pie to screen.
    e.Graphics.FillPie(redBrush, rect, startAngle, sweepAngle);
}
public:
   void FillPieRectangle( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create rectangle for ellipse.
      Rectangle rect = Rectangle(0,0,200,100);

      // Create start and sweep angles.
      float startAngle = 0.0F;
      float sweepAngle = 45.0F;

      // Fill pie to screen.
      e->Graphics->FillPie( redBrush, rect, startAngle, sweepAngle );
   }
public void FillPieRectangle(PaintEventArgs
 e) 
{
    // Create solid brush.
    SolidBrush redBrush =  new SolidBrush(Color.get_Red());

    // Create rectangle for ellipse.
    Rectangle rect =  new Rectangle(0, 0, 200, 100);

    // Create start and sweep angles.
    float startAngle = 0;
    float sweepAngle = 45;

    // Fill pie to screen.
    e.get_Graphics().FillPie(redBrush, rect, startAngle, sweepAngle);
} //FillPieRectangle
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPie メソッド (Brush, Int32, Int32, Int32, Int32, Int32, Int32)

座標ペア、幅、および高さで指定され楕円と 2 本の半径によって定義される扇形内部塗りつぶします。

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

Public Sub FillPie ( _
    brush As Brush, _
    x As Integer, _
    y As Integer, _
    width As Integer, _
    height As Integer, _
    startAngle As Integer, _
    sweepAngle As Integer _
)
Dim instance As Graphics
Dim brush As Brush
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim height As Integer
Dim startAngle As Integer
Dim sweepAngle As Integer

instance.FillPie(brush, x, y, width, height, startAngle, sweepAngle)
public void FillPie (
    Brush brush,
    int x,
    int y,
    int width,
    int height,
    int startAngle,
    int sweepAngle
)
public:
void FillPie (
    Brush^ brush, 
    int x, 
    int y, 
    int width, 
    int height, 
    int startAngle, 
    int sweepAngle
)
public void FillPie (
    Brush brush, 
    int x, 
    int y, 
    int width, 
    int height, 
    int startAngle, 
    int sweepAngle
)
public function FillPie (
    brush : Brush, 
    x : int, 
    y : int, 
    width : int, 
    height : int, 
    startAngle : int, 
    sweepAngle : int
)

パラメータ

brush

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

x

扇形の元となる楕円定義する外接する四角形左上隅の x 座標

y

扇形の元となる楕円定義する外接する四角形左上隅の y 座標

width

扇形の元となる楕円定義する外接する四角形の幅。

height

扇形の元となる楕円定義する外接する四角形の高さ。

startAngle

x 軸から扇形最初の辺まで、時計回り測定した角度 (度単位)。

sweepAngle

startAngle パラメータから扇形2 番目の辺まで、時計回り測定した角度 (度単位)。

例外例外
例外種類条件

ArgumentNullException

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

解説解説
使用例使用例

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

Public Sub FillPieInt(ByVal
 e As PaintEventArgs)

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

    ' Create location and size of ellipse.
    Dim x As Integer = 0
    Dim y As Integer = 0
    Dim width As Integer
 = 200
    Dim height As Integer
 = 100

    ' Create start and sweep angles.
    Dim startAngle As Integer
 = 0
    Dim sweepAngle As Integer
 = 45

    ' Fill pie to screen.
    e.Graphics.FillPie(redBrush, x, y, width, height, startAngle, _
    sweepAngle)
End Sub
public void FillPieInt(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create location and size of ellipse.
    int x = 0;
    int y = 0;
    int width = 200;
    int height = 100;
             
    // Create start and sweep angles.
    int startAngle =  0;
    int sweepAngle = 45;
             
    // Fill pie to screen.
    e.Graphics.FillPie(redBrush, x, y, width, height, startAngle, sweepAngle);
}
public:
   void FillPieInt( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create location and size of ellipse.
      int x = 0;
      int y = 0;
      int width = 200;
      int height = 100;

      // Create start and sweep angles.
      int startAngle = 0;
      int sweepAngle = 45;
      
      // Fill pie to screen.
      e->Graphics->FillPie( redBrush, x, y, width, height, startAngle, sweepAngle
 );
   }
public void FillPieInt(PaintEventArgs e) 
{
    // Create solid brush.
    SolidBrush redBrush =  new SolidBrush(Color.get_Red());

    // Create location and size of ellipse.
    int x = 0;
    int y = 0;
    int width = 200;
    int height = 100;

    // Create start and sweep angles.
    int startAngle = 0;
    int sweepAngle = 45;

    // Fill pie to screen.
    e.get_Graphics().FillPie(redBrush, x, y, width, height, startAngle,
        sweepAngle);
} //FillPieInt
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPie メソッド

座標ペア、幅、および高さで指定され楕円と 2 本の半径によって定義される扇形内部塗りつぶします。
オーバーロードの一覧オーバーロードの一覧

名前 説明
Graphics.FillPie (Brush, Rectangle, Single, Single) RectangleF 構造体と 2 本の半径によって指定され楕円定義される扇形内部塗りつぶします。
Graphics.FillPie (Brush, Int32, Int32, Int32, Int32, Int32, Int32) 座標ペア、幅、および高さで指定され楕円と 2 本の半径によって定義される扇形内部塗りつぶします。
Graphics.FillPie (Brush, Single, Single, Single, Single, Single, Single) 座標ペア、幅、および高さで指定され楕円と 2 本の半径によって定義される扇形内部塗りつぶします。
参照参照



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

辞書ショートカット

すべての辞書の索引

「Graphics.FillPie」の関連用語

Graphics.FillPieのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS