語言

AdjustableArrowCap 建構函式

定義

初始化一個以指定寬度與高度的新類別實例 AdjustableArrowCap 。

多載

名稱 Description
AdjustableArrowCap(Single, Single)

初始化一個以指定寬度與高度的新類別實例 AdjustableArrowCap 。 用這個建構器製作的箭頭端蓋總是被填滿。

AdjustableArrowCap(Single, Single, Boolean)

初始化一個新的類別實例 AdjustableArrowCap ,並具備指定的寬度、高度與填充特性。 是否填滿箭頭端蓋取決於傳遞給參數 isFilled 的參數。

AdjustableArrowCap(Single, Single)

來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs

初始化一個以指定寬度與高度的新類別實例 AdjustableArrowCap 。 用這個建構器製作的箭頭端蓋總是被填滿。

public:
 AdjustableArrowCap(float width, float height);
public AdjustableArrowCap(float width, float height);
new System.Drawing.Drawing2D.AdjustableArrowCap : single * single -> System.Drawing.Drawing2D.AdjustableArrowCap
Public Sub New (width As Single, height As Single)

參數

width
Single

箭頭的寬度。

height
Single

箭頭的高度。

範例

以下範例是為 Windows Forms 設計,需要 PaintEventArgse,一個 OnPaint 事件物件。 此程式碼會執行下列動作:

public:
   void ConstructAdjArrowCap1( PaintEventArgs^ e )
   {
      AdjustableArrowCap^ myArrow = gcnew AdjustableArrowCap( 6,6 );
      Pen^ capPen = gcnew Pen( Color::Black );
      capPen->CustomStartCap = myArrow;
      capPen->CustomEndCap = myArrow;
      e->Graphics->DrawLine( capPen, 50, 50, 200, 50 );
   }
public void ConstructAdjArrowCap1(PaintEventArgs e)
{     
    AdjustableArrowCap myArrow = new AdjustableArrowCap(6, 6);
    Pen capPen = new Pen(Color.Black);
    capPen.CustomStartCap = myArrow;
    capPen.CustomEndCap = myArrow;
    e.Graphics.DrawLine(capPen, 50, 50, 200, 50);
}
Public Sub ConstructAdjArrowCap1(ByVal e As PaintEventArgs)
    Dim myArrow As New AdjustableArrowCap(6, 6)
    Dim customArrow As CustomLineCap = myArrow
    Dim capPen As New Pen(Color.Black)
    capPen.CustomStartCap = myArrow
    capPen.CustomEndCap = myArrow
    e.Graphics.DrawLine(capPen, 50, 50, 200, 50)
End Sub

適用於

AdjustableArrowCap(Single, Single, Boolean)

來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs
來源:
AdjustableArrowCap.cs

初始化一個新的類別實例 AdjustableArrowCap ,並具備指定的寬度、高度與填充特性。 是否填滿箭頭端蓋取決於傳遞給參數 isFilled 的參數。

public:
 AdjustableArrowCap(float width, float height, bool isFilled);
public AdjustableArrowCap(float width, float height, bool isFilled);
new System.Drawing.Drawing2D.AdjustableArrowCap : single * single * bool -> System.Drawing.Drawing2D.AdjustableArrowCap
Public Sub New (width As Single, height As Single, isFilled As Boolean)

參數

width
Single

箭頭的寬度。

height
Single

箭頭的高度。

isFilled
Boolean

true填滿箭頭蓋;否則,。 false

範例

以下範例是為 Windows Forms 設計,需要 PaintEventArgse,一個 OnPaint 事件物件。 此程式碼會執行下列動作:

public:
   void ConstructAdjArrowCap2( PaintEventArgs^ e )
   {
      AdjustableArrowCap^ myArrow = gcnew AdjustableArrowCap( 6,6,false );
      Pen^ capPen = gcnew Pen( Color::Black );
      capPen->CustomStartCap = myArrow;
      capPen->CustomEndCap = myArrow;
      e->Graphics->DrawLine( capPen, 50, 50, 200, 50 );
   }
public void ConstructAdjArrowCap2(PaintEventArgs e)
{     
    AdjustableArrowCap myArrow = new AdjustableArrowCap(6, 6, false);
    Pen capPen = new Pen(Color.Black);
    capPen.CustomStartCap = myArrow;
    capPen.CustomEndCap = myArrow;
    e.Graphics.DrawLine(capPen, 50, 50, 200, 50);
}
Public Sub ConstructAdjArrowCap2(ByVal e As PaintEventArgs)
    Dim myArrow As New AdjustableArrowCap(6, 6, False)
    Dim customArrow As CustomLineCap = myArrow
    Dim capPen As New Pen(Color.Black)
    capPen.CustomStartCap = myArrow
    capPen.CustomEndCap = myArrow
    e.Graphics.DrawLine(capPen, 50, 50, 200, 50)
End Sub

適用於