Graphics.DrawLines 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
Point 구조체의 배열을 연결하는 일련의 선 세그먼트를 그립니다.
오버로드
DrawLines(Pen, ReadOnlySpan<Point>) | |
DrawLines(Pen, ReadOnlySpan<PointF>) | |
DrawLines(Pen, Point[]) |
Point 구조체의 배열을 연결하는 일련의 선 세그먼트를 그립니다. |
DrawLines(Pen, PointF[]) |
PointF 구조체의 배열을 연결하는 일련의 선 세그먼트를 그립니다. |
DrawLines(Pen, ReadOnlySpan<Point>)
- Source:
- Graphics.cs
public:
void DrawLines(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::Point> points);
public void DrawLines (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.Point> points);
member this.DrawLines : System.Drawing.Pen * ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub DrawLines (pen As Pen, points As ReadOnlySpan(Of Point))
매개 변수
- pen
- Pen
- points
- ReadOnlySpan<Point>
적용 대상
DrawLines(Pen, ReadOnlySpan<PointF>)
- Source:
- Graphics.cs
public:
void DrawLines(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::PointF> points);
public void DrawLines (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points);
member this.DrawLines : System.Drawing.Pen * ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub DrawLines (pen As Pen, points As ReadOnlySpan(Of PointF))
매개 변수
- pen
- Pen
- points
- ReadOnlySpan<PointF>
적용 대상
DrawLines(Pen, Point[])
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Point 구조체의 배열을 연결하는 일련의 선 세그먼트를 그립니다.
public:
void DrawLines(System::Drawing::Pen ^ pen, cli::array <System::Drawing::Point> ^ points);
public:
void DrawLines(System::Drawing::Pen ^ pen, ... cli::array <System::Drawing::Point> ^ points);
public void DrawLines (System.Drawing.Pen pen, System.Drawing.Point[] points);
public void DrawLines (System.Drawing.Pen pen, params System.Drawing.Point[] points);
member this.DrawLines : System.Drawing.Pen * System.Drawing.Point[] -> unit
Public Sub DrawLines (pen As Pen, points As Point())
Public Sub DrawLines (pen As Pen, ParamArray points As Point())
매개 변수
예외
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
검은색 펜을 만듭니다.
선의 세그먼트 요소 배열을 만듭니다.
연결된 선 세그먼트를 화면에 그립니다.
public:
void DrawLinesPoint( PaintEventArgs^ e )
{
// Create pen.
Pen^ pen = gcnew Pen( Color::Black,3.0f );
// Create array of points that define lines to draw.
array<Point>^ points = {Point(10,10),Point(10,100),Point(200,50),Point(250,300)};
//Draw lines to screen.
e->Graphics->DrawLines( pen, points );
}
public void DrawLinesPoint(PaintEventArgs e)
{
// Create pen.
Pen pen = new Pen(Color.Black, 3);
// Create array of points that define lines to draw.
Point[] points =
{
new Point(10, 10),
new Point(10, 100),
new Point(200, 50),
new Point(250, 300)
};
//Draw lines to screen.
e.Graphics.DrawLines(pen, points);
}
Public Sub DrawLinesPoint(ByVal e As PaintEventArgs)
' Create pen.
Dim blackPen As New Pen(Color.Black, 3)
' Create array of points that define lines to draw.
Dim points As Point() = {New Point(10, 10), New Point(10, 100), _
New Point(200, 50), New Point(250, 300)}
'Draw lines to screen.
e.Graphics.DrawLines(blackPen, points)
End Sub
설명
이 메서드는 끝점 배열을 연결하는 일련의 선을 그립니다. 배열의 처음 두 점은 첫 번째 줄을 지정합니다. 각 추가 지점은 시작점이 이전 선 세그먼트의 끝점인 선 세그먼트의 끝을 지정합니다.
적용 대상
DrawLines(Pen, PointF[])
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
PointF 구조체의 배열을 연결하는 일련의 선 세그먼트를 그립니다.
public:
void DrawLines(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points);
public void DrawLines (System.Drawing.Pen pen, System.Drawing.PointF[] points);
member this.DrawLines : System.Drawing.Pen * System.Drawing.PointF[] -> unit
Public Sub DrawLines (pen As Pen, points As PointF())
매개 변수
예외
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse
코드는 다음 작업을 수행합니다.
코드는 검은색 펜을 만듭니다.
선의 세그먼트 요소 배열을 만듭니다.
연결된 선 세그먼트를 화면에 그립니다.
public:
void DrawLinesPointF( PaintEventArgs^ e )
{
// Create pen.
Pen^ pen = gcnew Pen( Color::Black,3.0f );
// Create array of points that define lines to draw.
array<PointF>^ points = {PointF(10.0F,10.0F),PointF(10.0F,100.0F),PointF(200.0F,50.0F),PointF(250.0F,300.0F)};
//Draw lines to screen.
e->Graphics->DrawLines( pen, points );
}
public void DrawLinesPointF(PaintEventArgs e)
{
// Create pen.
Pen pen = new Pen(Color.Black, 3);
// Create array of points that define lines to draw.
PointF[] points =
{
new PointF(10.0F, 10.0F),
new PointF(10.0F, 100.0F),
new PointF(200.0F, 50.0F),
new PointF(250.0F, 300.0F)
};
//Draw lines to screen.
e.Graphics.DrawLines(pen, points);
}
Public Sub DrawLinesPointF(ByVal e As PaintEventArgs)
' Create pen.
Dim blackPen As New Pen(Color.Black, 3)
' Create array of points that define lines to draw.
Dim points As PointF() = {New PointF(10.0F, 10.0F), _
New PointF(10.0F, 100.0F), New PointF(200.0F, 50.0F), _
New PointF(250.0F, 300.0F)}
'Draw lines to screen.
e.Graphics.DrawLines(blackPen, points)
End Sub
설명
이 메서드는 끝점 배열을 연결하는 일련의 선을 그립니다. 배열의 처음 두 점은 첫 번째 줄을 지정합니다. 각 추가 지점은 시작점이 이전 선 세그먼트의 끝점인 선 세그먼트의 끝을 지정합니다.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기