GraphicsPath.AddRectangles 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 경로에 일련의 사각형을 추가합니다.
오버로드
| Name | Description |
|---|---|
| AddRectangles(Rectangle[]) |
이 경로에 일련의 사각형을 추가합니다. |
| AddRectangles(RectangleF[]) |
이 경로에 일련의 사각형을 추가합니다. |
| AddRectangles(ReadOnlySpan<Rectangle>) |
이 경로에 일련의 사각형을 추가합니다. |
| AddRectangles(ReadOnlySpan<RectangleF>) |
이 경로에 일련의 사각형을 추가합니다. |
AddRectangles(Rectangle[])
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 경로에 일련의 사각형을 추가합니다.
public:
void AddRectangles(... cli::array <System::Drawing::Rectangle> ^ rects);
public:
void AddRectangles(cli::array <System::Drawing::Rectangle> ^ rects);
public void AddRectangles(params System.Drawing.Rectangle[] rects);
public void AddRectangles(System.Drawing.Rectangle[] rects);
member this.AddRectangles : System.Drawing.Rectangle[] -> unit
Public Sub AddRectangles (ParamArray rects As Rectangle())
Public Sub AddRectangles (rects As Rectangle())
매개 변수
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 PaintEventArgs 이벤트 개체인 eOnPaint가 필요합니다. 코드는 다음 작업을 수행합니다.
경로를 만듭니다.
사각형 배열을 만들고 경로에 사각형을 추가합니다.
화면의 경로를 그립니다.
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.Black, 2);
e.Graphics.DrawPath(myPen, myPath);
}
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
적용 대상
AddRectangles(RectangleF[])
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 경로에 일련의 사각형을 추가합니다.
public:
void AddRectangles(... cli::array <System::Drawing::RectangleF> ^ rects);
public:
void AddRectangles(cli::array <System::Drawing::RectangleF> ^ rects);
public void AddRectangles(params System.Drawing.RectangleF[] rects);
public void AddRectangles(System.Drawing.RectangleF[] rects);
member this.AddRectangles : System.Drawing.RectangleF[] -> unit
Public Sub AddRectangles (ParamArray rects As RectangleF())
Public Sub AddRectangles (rects As RectangleF())
매개 변수
- rects
- RectangleF[]
추가할 사각형을 나타내는 구조체의 배열 RectangleF 입니다.
예제
예제를 보려면 AddRectangles(Rectangle[])를 참조하세요.
적용 대상
AddRectangles(ReadOnlySpan<Rectangle>)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 경로에 일련의 사각형을 추가합니다.
public:
void AddRectangles(ReadOnlySpan<System::Drawing::Rectangle> rects);
public void AddRectangles(scoped ReadOnlySpan<System.Drawing.Rectangle> rects);
member this.AddRectangles : ReadOnlySpan<System.Drawing.Rectangle> -> unit
Public Sub AddRectangles (rects As ReadOnlySpan(Of Rectangle))
매개 변수
- rects
- ReadOnlySpan<Rectangle>
추가할 사각형을 나타내는 구조체의 배열 RectangleF 입니다.
적용 대상
AddRectangles(ReadOnlySpan<RectangleF>)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
이 경로에 일련의 사각형을 추가합니다.
public:
void AddRectangles(ReadOnlySpan<System::Drawing::RectangleF> rects);
public void AddRectangles(scoped ReadOnlySpan<System.Drawing.RectangleF> rects);
member this.AddRectangles : ReadOnlySpan<System.Drawing.RectangleF> -> unit
Public Sub AddRectangles (rects As ReadOnlySpan(Of RectangleF))
매개 변수
- rects
- ReadOnlySpan<RectangleF>
추가할 사각형을 나타내는 구조체의 배열 RectangleF 입니다.