GraphicsPath.AddLines 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다.
오버로드
| Name | Description |
|---|---|
| AddLines(Point[]) |
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다. |
| AddLines(PointF[]) |
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다. |
| AddLines(ReadOnlySpan<Point>) |
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다. |
| AddLines(ReadOnlySpan<PointF>) |
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다. |
AddLines(Point[])
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다.
public:
void AddLines(... cli::array <System::Drawing::Point> ^ points);
public:
void AddLines(cli::array <System::Drawing::Point> ^ points);
public void AddLines(params System.Drawing.Point[] points);
public void AddLines(System.Drawing.Point[] points);
member this.AddLines : System.Drawing.Point[] -> unit
Public Sub AddLines (ParamArray points As Point())
Public Sub AddLines (points As Point())
매개 변수
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 PaintEventArgs 이벤트 개체인 eOnPaint가 필요합니다. 코드는 다음 작업을 수행합니다.
삼각형을 설명하는 4개의 점 배열을 만듭니다.
경로를 만들고 선 배열을 추가합니다.
화면의 경로를 그립니다.
첫 번째 점 뒤의 각 줄은 이전 지점을 시작점으로 사용하고 새 점을 엔드포인트로 사용합니다.
private:
void AddLinesExample( PaintEventArgs^ e )
{
// Create a symetrical triangle using an array of points.
array<Point>^ myArray = {Point(30,30),Point(60,60),Point(0,60),Point(30,30)};
//Create a path and add lines.
GraphicsPath^ myPath = gcnew GraphicsPath;
myPath->AddLines( myArray );
// Draw the path to the screen.
Pen^ myPen = gcnew Pen( Color::Black,2.0f );
e->Graphics->DrawPath( myPen, myPath );
}
private void AddLinesExample(PaintEventArgs e)
{
// Create a symmetrical triangle using an array of points.
Point[] myArray =
{
new Point(30,30),
new Point(60,60),
new Point(0,60),
new Point(30,30)
};
//Create a path and add lines.
GraphicsPath myPath = new GraphicsPath();
myPath.AddLines(myArray);
// Draw the path to the screen.
Pen myPen = new Pen(Color.Black, 2);
e.Graphics.DrawPath(myPen, myPath);
}
Public Sub AddLinesExample(ByVal e As PaintEventArgs)
'Create a symmetrical triangle using an array of points.
Dim myArray As Point() = {New Point(30, 30), New Point(60, 60), _
New Point(0, 60), New Point(30, 30)}
Dim myPath As New GraphicsPath
myPath.AddLines(myArray)
' Draw the path to the screen.
Dim myPen As New Pen(Color.Black, 2)
e.Graphics.DrawPath(myPen, myPath)
End Sub
설명
그림에 이전 선이나 곡선이 있는 경우 선이 추가되어 이전 세그먼트의 엔드포인트를 선의 시작점에 연결합니다. 매개 변수는 points 엔드포인트의 배열을 지정합니다. 처음 두 줄은 첫 번째 줄을 지정합니다. 각 추가 지점은 시작점이 이전 줄의 엔드포인트인 선 세그먼트의 엔드포인트를 지정합니다.
적용 대상
AddLines(PointF[])
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다.
public:
void AddLines(... cli::array <System::Drawing::PointF> ^ points);
public:
void AddLines(cli::array <System::Drawing::PointF> ^ points);
public void AddLines(params System.Drawing.PointF[] points);
public void AddLines(System.Drawing.PointF[] points);
member this.AddLines : System.Drawing.PointF[] -> unit
Public Sub AddLines (ParamArray points As PointF())
Public Sub AddLines (points As PointF())
매개 변수
예외
예제
예제를 보려면 AddLines(Point[])를 참조하세요.
설명
그림에 이전 선이나 곡선이 있는 경우 선이 추가되어 이전 세그먼트의 엔드포인트를 선의 시작점에 연결합니다. 매개 변수는 points 엔드포인트의 배열을 지정합니다. 처음 두 줄은 첫 번째 줄을 지정합니다. 각 추가 지점은 시작점이 이전 줄의 엔드포인트인 선 세그먼트의 엔드포인트를 지정합니다.
적용 대상
AddLines(ReadOnlySpan<Point>)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다.
public:
void AddLines(ReadOnlySpan<System::Drawing::Point> points);
public void AddLines(scoped ReadOnlySpan<System.Drawing.Point> points);
member this.AddLines : ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub AddLines (points As ReadOnlySpan(Of Point))
매개 변수
- points
- ReadOnlySpan<Point>
추가할 선 세그먼트를 정의하는 점을 나타내는 구조체의 배열 PointF 입니다.
적용 대상
AddLines(ReadOnlySpan<PointF>)
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
- Source:
- GraphicsPath.cs
일련의 연결된 선 세그먼트를 이 GraphicsPath끝 부분에 추가합니다.
public:
void AddLines(ReadOnlySpan<System::Drawing::PointF> points);
public void AddLines(scoped ReadOnlySpan<System.Drawing.PointF> points);
member this.AddLines : ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub AddLines (points As ReadOnlySpan(Of PointF))
매개 변수
- points
- ReadOnlySpan<PointF>
추가할 선 세그먼트를 정의하는 점을 나타내는 구조체의 배열 PointF 입니다.