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 メソッド
を検索
- Pen.SetLineCap メソッドのページへのリンク