Pen.SetLineCap メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Pen Dim startCap As LineCap Dim endCap As LineCap Dim dashCap As DashCap instance.SetLineCap(startCap, endCap, dashCap)

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードでは、Pen を作成し、直線の始点の矢印のアンカ キャップを描画するよう設定します。
Public Sub SetLineCap_Example(ByVal e As PaintEventArgs) ' Create a Pen object with a dash pattern. Dim capPen As New Pen(Color.Black, 5) capPen.DashStyle = DashStyle.Dash ' Set the start and end caps for capPen. capPen.SetLineCap(LineCap.ArrowAnchor, LineCap.Flat, DashCap.Flat) ' Draw a line with capPen. e.Graphics.DrawLine(capPen, 10, 10, 200, 10) End Sub
public void SetLineCap_Example(PaintEventArgs e) { // Create a Pen object with a dash pattern. Pen capPen = new Pen(Color.Black, 5); capPen.DashStyle = DashStyle.Dash; // Set the start and end caps for capPen. capPen.SetLineCap(LineCap.ArrowAnchor, LineCap.Flat, DashCap.Flat); // Draw a line with capPen. e.Graphics.DrawLine(capPen, 10, 10, 200, 10); }
public: void SetLineCap_Example( PaintEventArgs^ e ) { // Create a Pen object with a dash pattern. Pen^ capPen = gcnew Pen( Color::Black,5.0f ); capPen->DashStyle = DashStyle::Dash; // Set the start and end caps for capPen. capPen->SetLineCap( LineCap::ArrowAnchor, LineCap::Flat, DashCap::Flat ); // Draw a line with capPen. e->Graphics->DrawLine( capPen, 10, 10, 200, 10 ); }
public void SetLineCap_Example(PaintEventArgs e) { // Create a Pen object with a dash pattern. Pen capPen = new Pen(Color.get_Black(), 5); capPen.set_DashStyle(DashStyle.Dash); // Set the start and end caps for capPen. capPen.SetLineCap(LineCap.ArrowAnchor, LineCap.Flat, DashCap.Flat); // Draw a line with capPen. e.get_Graphics().DrawLine(capPen, 10, 10, 200, 10); } //SetLineCap_Example

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に収録されているすべての辞書からPen.SetLineCap メソッドを検索する場合は、下記のリンクをクリックしてください。

- Pen.SetLineCap メソッドのページへのリンク