GraphicsPath.AddRectangles メソッド (RectangleF[])
アセンブリ: 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.AddRectangles メソッド

名前 | 説明 |
---|---|
GraphicsPath.AddRectangles (Rectangle[]) | パスに一連の四角形を追加します。 |
GraphicsPath.AddRectangles (RectangleF[]) | パスに一連の四角形を追加します。 |

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


次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub AddRectanglesExample(ByVal e As PaintEventArgs) ' Adds a pattern of rectangles to a GraphicsPath object. Dim myPath As New GraphicsPath Dim pathRects As Rectangle() = {New Rectangle(20, 20, 100, 200), _ New Rectangle(40, 40, 120, 220), New Rectangle(60, 60, 240, 140)} myPath.AddRectangles(pathRects) ' Draw the path to the screen. Dim myPen As New Pen(Color.Black, 2) e.Graphics.DrawPath(myPen, myPath) End Sub
private void AddRectanglesExample(PaintEventArgs e) { // Adds a pattern of rectangles to a GraphicsPath object. GraphicsPath myPath = new GraphicsPath(); Rectangle[] pathRects = { new Rectangle(20,20,100,200), new Rectangle(40,40,120,220), new Rectangle(60,60,240,140) }; myPath.AddRectangles(pathRects); // Draw the path to the screen. Pen myPen = new Pen(Color.Black, 2); e.Graphics.DrawPath(myPen, myPath); }
private: void AddRectanglesExample( PaintEventArgs^ e ) { // Adds a pattern of rectangles to a GraphicsPath object. GraphicsPath^ myPath = gcnew GraphicsPath; array<Rectangle>^ pathRects = {Rectangle(20,20,100,200),Rectangle(40 ,40,120,220),Rectangle(60,60,240,140)}; myPath->AddRectangles( pathRects ); // Draw the path to the screen. Pen^ myPen = gcnew Pen( Color::Black,2.0f ); e->Graphics->DrawPath( myPen, myPath ); }
private void AddRectanglesExample(PaintEventArgs e) { // Adds a pattern of rectangles to a GraphicsPath object. GraphicsPath myPath = new GraphicsPath(); Rectangle pathRects[] = { new Rectangle(20, 20, 100, 200), new Rectangle(40, 40, 120, 220), new Rectangle(60, 60, 240, 140) }; myPath.AddRectangles(pathRects); // Draw the path to the screen. Pen myPen = new Pen(Color.get_Black(), 2); e.get_Graphics().DrawPath(myPen, myPath); } //AddRectanglesExample

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

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