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

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

Graphics.FillPolygon メソッド (Brush, Point[])

Point 構造体指定された点の配列によって定義される多角形内部塗りつぶします。

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

例外例外
例外種類条件

ArgumentNullException

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

または

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

解説解説
使用例使用例

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

Public Sub FillPolygonPoint(ByVal
 e As PaintEventArgs)

    ' Create solid brush.
    Dim blueBrush As New
 SolidBrush(Color.Blue)

    ' Create points that define polygon.
    Dim point1 As New Point(50,
 50)
    Dim point2 As New Point(100,
 25)
    Dim point3 As New Point(200,
 5)
    Dim point4 As New Point(250,
 50)
    Dim point5 As New Point(300,
 100)
    Dim point6 As New Point(350,
 200)
    Dim point7 As New Point(250,
 250)
    Dim curvePoints As Point() = {point1, point2,
 point3, point4, _
    point5, point6, point7}

    ' Draw polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints)
End Sub
public void FillPolygonPoint(PaintEventArgs
 e)
{

    // Create solid brush.
    SolidBrush blueBrush = new SolidBrush(Color.Blue);

    // Create points that define polygon.
    Point point1 = new Point(50, 50);
    Point point2 = new Point(100, 25);
    Point point3 = new Point(200, 5);
    Point point4 = new Point(250, 50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints);
}
public:
   void FillPolygonPoint( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ blueBrush = gcnew SolidBrush( Color::Blue );

      // Create points that define polygon.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6
,point7};

      // Draw polygon to screen.
      e->Graphics->FillPolygon( blueBrush, curvePoints );
   }
public void FillPolygonPoint(PaintEventArgs
 e) 
{
    // Create solid brush.
    SolidBrush blueBrush =  new SolidBrush(Color.get_Blue());

    // Create points that define polygon.
    Point point1 =  new Point(50, 50);
    Point point2 =  new Point(100, 25);
    Point point3 =  new Point(200, 5);
    Point point4 =  new Point(250, 50);
    Point point5 =  new Point(300, 100);
    Point point6 =  new Point(350, 200);
    Point point7 =  new Point(250, 250);
    Point curvePoints[] =  {point1, point2, point3, point4, point5, point6,
        point7};

    // Draw polygon to screen.
    e.get_Graphics().FillPolygon(blueBrush, curvePoints);
} //FillPolygonPoint
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPolygon メソッド (Brush, PointF[])

PointF 構造体指定された点の配列によって定義される多角形内部塗りつぶします。

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

Public Sub FillPolygon ( _
    brush As Brush, _
    points As PointF() _
)
Dim instance As Graphics
Dim brush As Brush
Dim points As PointF()

instance.FillPolygon(brush, points)
public void FillPolygon (
    Brush brush,
    PointF[] points
)
public:
void FillPolygon (
    Brush^ brush, 
    array<PointF>^ points
)
public void FillPolygon (
    Brush brush, 
    PointF[] points
)
public function FillPolygon (
    brush : Brush, 
    points : PointF[]
)

パラメータ

brush

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

points

塗りつぶす多角形頂点を表す PointF 構造体配列

例外例外
例外種類条件

ArgumentNullException

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

または

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

解説解説
使用例使用例

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

Public Sub FillPolygonPointF(ByVal
 e As PaintEventArgs)

    ' Create solid brush.
    Dim blueBrush As New
 SolidBrush(Color.Blue)

    ' Create points that define polygon.
    Dim point1 As New PointF(50.0F,
 50.0F)
    Dim point2 As New PointF(100.0F,
 25.0F)
    Dim point3 As New PointF(200.0F,
 5.0F)
    Dim point4 As New PointF(250.0F,
 50.0F)
    Dim point5 As New PointF(300.0F,
 100.0F)
    Dim point6 As New PointF(350.0F,
 200.0F)
    Dim point7 As New PointF(250.0F,
 250.0F)
    Dim curvePoints As PointF() = {point1,
 point2, point3, point4, _
    point5, point6, point7}

    ' Fill polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints)
End Sub
public void FillPolygonPointF(PaintEventArgs
 e)
{

    // Create solid brush.
    SolidBrush blueBrush = new SolidBrush(Color.Blue);

    // Create points that define polygon.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Fill polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints);
}
public:
   void FillPolygonPointF( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ blueBrush = gcnew SolidBrush( Color::Blue );

      // Create points that define polygon.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<PointF>^ curvePoints = {point1,point2,point3,point4,point5,point6
,point7};

      // Fill polygon to screen.
      e->Graphics->FillPolygon( blueBrush, curvePoints );
   }
public void FillPolygonPointF(PaintEventArgs
 e) 
{
    // Create solid brush.
    SolidBrush blueBrush =  new SolidBrush(Color.get_Blue());

    // Create points that define polygon.
    PointF point1 =  new PointF(50, 50);
    PointF point2 =  new PointF(100, 25);
    PointF point3 =  new PointF(200, 5);
    PointF point4 =  new PointF(250, 50);
    PointF point5 =  new PointF(300, 100);
    PointF point6 =  new PointF(350, 200);
    PointF point7 =  new PointF(250, 250);
    PointF curvePoints[] =  {point1, point2, point3, point4, point5, 
                            point6, point7};

    // Fill polygon to screen.
    e.get_Graphics().FillPolygon(blueBrush, curvePoints);
} //FillPolygonPointF
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPolygon メソッド (Brush, PointF[], FillMode)

PointF 構造体指定された点の配列によって定義される多角形内部指定塗りつぶしモード塗りつぶします。

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

Public Sub FillPolygon ( _
    brush As Brush, _
    points As PointF(), _
    fillMode As FillMode _
)
Dim instance As Graphics
Dim brush As Brush
Dim points As PointF()
Dim fillMode As FillMode

instance.FillPolygon(brush, points, fillMode)
public void FillPolygon (
    Brush brush,
    PointF[] points,
    FillMode fillMode
)
public:
void FillPolygon (
    Brush^ brush, 
    array<PointF>^ points, 
    FillMode fillMode
)
public void FillPolygon (
    Brush brush, 
    PointF[] points, 
    FillMode fillMode
)
public function FillPolygon (
    brush : Brush, 
    points : PointF[], 
    fillMode : FillMode
)

パラメータ

brush

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

points

塗りつぶす多角形頂点を表す PointF 構造体配列

fillMode

塗りつぶしスタイル決定する FillMode 列挙体のメンバ

例外例外
例外種類条件

ArgumentNullException

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

または

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

解説解説
使用例使用例

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

Public Sub FillPolygonPointFFillMode(ByVal
 e As PaintEventArgs)

    ' Create solid brush.
    Dim blueBrush As New
 SolidBrush(Color.Blue)

    ' Create points that define polygon.
    Dim point1 As New PointF(50.0F,
 50.0F)
    Dim point2 As New PointF(100.0F,
 25.0F)
    Dim point3 As New PointF(200.0F,
 5.0F)
    Dim point4 As New PointF(250.0F,
 50.0F)
    Dim point5 As New PointF(300.0F,
 100.0F)
    Dim point6 As New PointF(350.0F,
 200.0F)
    Dim point7 As New PointF(250.0F,
 250.0F)
    Dim curvePoints As PointF() = {point1,
 point2, point3, point4, _
    point5, point6, point7}

    ' Define fill mode.
    Dim newFillMode As FillMode = FillMode.Winding

    ' Fill polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints, newFillMode)
End Sub
public void FillPolygonPointFFillMode(PaintEventArgs
 e)
{

    // Create solid brush.
    SolidBrush blueBrush = new SolidBrush(Color.Blue);

    // Create points that define polygon.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Define fill mode.
    FillMode newFillMode = FillMode.Winding;

    // Fill polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints, newFillMode);
}
public:
   void FillPolygonPointFFillMode( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ blueBrush = gcnew SolidBrush( Color::Blue );

      // Create points that define polygon.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<PointF>^ curvePoints = {point1,point2,point3,point4,point5,point6
,point7};

      // Define fill mode.
      FillMode newFillMode = FillMode::Winding;

      // Fill polygon to screen.
      e->Graphics->FillPolygon( blueBrush, curvePoints, newFillMode );
   }
public void FillPolygonPointFFillMode(PaintEventArgs
 e) 
{
    // Create solid brush.
    SolidBrush blueBrush =  new SolidBrush(Color.get_Blue());

    // Create points that define polygon.
    PointF point1 =  new PointF(50, 50);
    PointF point2 =  new PointF(100, 25);
    PointF point3 =  new PointF(200, 5);
    PointF point4 =  new PointF(250, 50);
    PointF point5 =  new PointF(300, 100);
    PointF point6 =  new PointF(350, 200);
    PointF point7 =  new PointF(250, 250);
    PointF curvePoints[] =  {point1, point2, point3, point4, point5, 
                            point6, point7};

    // Define fill mode.
    FillMode newFillMode = FillMode.Winding;

    // Fill polygon to screen.
    e.get_Graphics().FillPolygon(blueBrush, curvePoints, newFillMode);
} //FillPolygonPointFFillMode
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPolygon メソッド (Brush, Point[], FillMode)

Point 構造体指定された点の配列によって定義される多角形内部指定塗りつぶしモード塗りつぶします。

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

Public Sub FillPolygon ( _
    brush As Brush, _
    points As Point(), _
    fillMode As FillMode _
)
Dim instance As Graphics
Dim brush As Brush
Dim points As Point()
Dim fillMode As FillMode

instance.FillPolygon(brush, points, fillMode)
public void FillPolygon (
    Brush brush,
    Point[] points,
    FillMode fillMode
)
public:
void FillPolygon (
    Brush^ brush, 
    array<Point>^ points, 
    FillMode fillMode
)
public void FillPolygon (
    Brush brush, 
    Point[] points, 
    FillMode fillMode
)
public function FillPolygon (
    brush : Brush, 
    points : Point[], 
    fillMode : FillMode
)

パラメータ

brush

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

points

塗りつぶす多角形頂点を表す Point 構造体配列

fillMode

塗りつぶしスタイル決定する FillMode 列挙体のメンバ

例外例外
例外種類条件

ArgumentNullException

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

または

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

解説解説
使用例使用例

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

Public Sub FillPolygonPointFillMode(ByVal
 e As PaintEventArgs)

    ' Create solid brush.
    Dim blueBrush As New
 SolidBrush(Color.Blue)

    ' Create points that define polygon.
    Dim point1 As New Point(50,
 50)
    Dim point2 As New Point(100,
 25)
    Dim point3 As New Point(200,
 5)
    Dim point4 As New Point(250,
 50)
    Dim point5 As New Point(300,
 100)
    Dim point6 As New Point(350,
 200)
    Dim point7 As New Point(250,
 250)
    Dim curvePoints As Point() = {point1, point2,
 point3, point4, _
    point5, point6, point7}

    ' Define fill mode.
    Dim newFillMode As FillMode = FillMode.Winding

    ' Draw polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints, newFillMode)
End Sub
public void FillPolygonPointFillMode(PaintEventArgs
 e)
{

    // Create solid brush.
    SolidBrush blueBrush = new SolidBrush(Color.Blue);

    // Create points that define polygon.
    Point point1 = new Point(50, 50);
    Point point2 = new Point(100, 25);
    Point point3 = new Point(200, 5);
    Point point4 = new Point(250, 50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Define fill mode.
    FillMode newFillMode = FillMode.Winding;

    // Draw polygon to screen.
    e.Graphics.FillPolygon(blueBrush, curvePoints, newFillMode);
}
public:
   void FillPolygonPointFillMode( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ blueBrush = gcnew SolidBrush( Color::Blue );

      // Create points that define polygon.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6
,point7};

      // Define fill mode.
      FillMode newFillMode = FillMode::Winding;

      // Draw polygon to screen.
      e->Graphics->FillPolygon( blueBrush, curvePoints, newFillMode );
   }
public void FillPolygonPointFillMode(PaintEventArgs
 e) 
{
    // Create solid brush.
    SolidBrush blueBrush =  new SolidBrush(Color.get_Blue());

    // Create points that define polygon.
    Point point1 =  new Point(50, 50);
    Point point2 =  new Point(100, 25);
    Point point3 =  new Point(200, 5);
    Point point4 =  new Point(250, 50);
    Point point5 =  new Point(300, 100);
    Point point6 =  new Point(350, 200);
    Point point7 =  new Point(250, 250);
    Point curvePoints[] =  {point1, point2, point3, point4, point5, point6,
                            point7};

    // Define fill mode.
    FillMode newFillMode = FillMode.Winding;

    // Draw polygon to screen.
    e.get_Graphics().FillPolygon(blueBrush, curvePoints, newFillMode);
} //FillPolygonPointFillMode
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.FillPolygon メソッド




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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2024 GRAS Group, Inc.RSS