GraphicsPath.AddPolygon メソッド (Point[])
アセンブリ: System.Drawing (system.drawing.dll 内)



次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub AddPolygonExample(ByVal e As PaintEventArgs) ' Create an array of points. Dim myArray As Point() = {New Point(23, 20), New Point(40, 10), _ New Point(57, 20), New Point(50, 40), New Point(30, 40)} ' Create a GraphicsPath object and add a polygon. Dim myPath As New GraphicsPath myPath.AddPolygon(myArray) ' Draw the path to the screen. Dim myPen As New Pen(Color.Black, 2) e.Graphics.DrawPath(myPen, myPath) End Sub
private void AddPolygonExample(PaintEventArgs e) { // Create an array of points. Point[] myArray = { new Point(23, 20), new Point(40, 10), new Point(57, 20), new Point(50, 40), new Point(30, 40) }; // Create a GraphicsPath object and add a polygon. GraphicsPath myPath = new GraphicsPath(); myPath.AddPolygon(myArray); // Draw the path to the screen. Pen myPen = new Pen(Color.Black, 2); e.Graphics.DrawPath(myPen, myPath); }
private: void AddPolygonExample( PaintEventArgs^ e ) { // Create an array of points. array<Point>^ myArray = {Point(23,20),Point(40,10),Point(57,20),Point(50 ,40),Point(30,40)}; // Create a GraphicsPath object and add a polygon. GraphicsPath^ myPath = gcnew GraphicsPath; myPath->AddPolygon( myArray ); // Draw the path to the screen. Pen^ myPen = gcnew Pen( Color::Black,2.0f ); e->Graphics->DrawPath( myPen, myPath ); }
private void AddPolygonExample(PaintEventArgs e) { // Create an array of points. Point myArray[] = { new Point(23, 20), new Point(40, 10), new Point(57, 20), new Point(50, 40), new Point(30, 40) }; // Create a GraphicsPath object and add a polygon. GraphicsPath myPath = new GraphicsPath(); myPath.AddPolygon(myArray); // Draw the path to the screen. Pen myPen = new Pen(Color.get_Black(), 2); e.get_Graphics().DrawPath(myPen, myPath); } //AddPolygonExample

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddPolygon メソッド (PointF[])
アセンブリ: System.Drawing (system.drawing.dll 内)




Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddPolygon メソッド
Weblioに収録されているすべての辞書からGraphicsPath.AddPolygonを検索する場合は、下記のリンクをクリックしてください。

- GraphicsPath.AddPolygonのページへのリンク