Pen.LineJoin 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 Pen선을 사용하여 그린 두 개의 연속 선 끝에 대한 조인 스타일을 가져오거나 설정합니다.
public:
property System::Drawing::Drawing2D::LineJoin LineJoin { System::Drawing::Drawing2D::LineJoin get(); void set(System::Drawing::Drawing2D::LineJoin value); };
public System.Drawing.Drawing2D.LineJoin LineJoin { get; set; }
member this.LineJoin : System.Drawing.Drawing2D.LineJoin with get, set
Public Property LineJoin As LineJoin
속성 값
이 LineJoin항목으로 그린 두 개의 연속 선 끝에 대한 조인 스타일을 나타내는 A Pen 입니다.
예외
예제
다음 코드 예제에서는 설정 WidthLineJoin 하 고 속성에 미치는 영향을 보여 Pen줍니다.
이 예제는 Windows Forms와 함께 사용하도록 설계되었습니다. 폼에 코드를 붙여넣고 양식의 ShowLineJoin 이벤트를 처리할 때 메서드를 호출 Paint 하여 다음과 같이 e 전달 PaintEventArgs 합니다.
private:
void ShowLineJoin( PaintEventArgs^ e )
{
// Create a new pen.
Pen^ skyBluePen = gcnew Pen( Brushes::DeepSkyBlue );
// Set the pen's width.
skyBluePen->Width = 8.0F;
// Set the LineJoin property.
skyBluePen->LineJoin = System::Drawing::Drawing2D::LineJoin::Bevel;
// Draw a rectangle.
e->Graphics->DrawRectangle( skyBluePen, Rectangle(40,40,150,200) );
//Dispose of the pen.
delete skyBluePen;
}
private void ShowLineJoin(PaintEventArgs e)
{
// Create a new pen.
Pen skyBluePen = new Pen(Brushes.DeepSkyBlue);
// Set the pen's width.
skyBluePen.Width = 8.0F;
// Set the LineJoin property.
skyBluePen.LineJoin = System.Drawing.Drawing2D.LineJoin.Bevel;
// Draw a rectangle.
e.Graphics.DrawRectangle(skyBluePen,
new Rectangle(40, 40, 150, 200));
//Dispose of the pen.
skyBluePen.Dispose();
}
Private Sub ShowLineJoin(ByVal e As PaintEventArgs)
' Create a new pen.
Dim skyBluePen As New Pen(Brushes.DeepSkyBlue)
' Set the pen's width.
skyBluePen.Width = 8.0F
' Set the LineJoin property.
skyBluePen.LineJoin = Drawing2D.LineJoin.Bevel
' Draw a rectangle.
e.Graphics.DrawRectangle(skyBluePen, _
New Rectangle(40, 40, 150, 200))
'Dispose of the pen.
skyBluePen.Dispose()
End Sub
설명
선 조인은 끝이 만나거나 겹치는 두 줄로 구성된 공통 영역입니다. 세 가지 선 조인 스타일은 miter, bevel 및 round입니다. 개체의 Pen 선 조인 스타일을 지정하면 해당 펜을 사용하여 그린 개체 GraphicsPath 의 모든 연결된 선에 조인 스타일이 적용됩니다. 다음 그림에서는 경사진 선 조인 예제의 결과를 보여 줍니다.