共用方式為


AdjustableArrowCap 建構函式

定義

使用指定的寬度和高度,初始化 AdjustableArrowCap 類別的新執行個體。

多載

AdjustableArrowCap(Single, Single)

使用指定的寬度和高度,初始化 AdjustableArrowCap 類別的新執行個體。 使用這個建構函式 (Constructor) 建立的箭端永遠是填滿的。

AdjustableArrowCap(Single, Single, Boolean)

使用指定的寬度、高度和填色屬性,初始化 AdjustableArrowCap 類別的新執行個體。 是否填滿箭端取決於傳遞至 isFilled 參數的引數。

AdjustableArrowCap(Single, Single)

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

使用指定的寬度和高度,初始化 AdjustableArrowCap 類別的新執行個體。 使用這個建構函式 (Constructor) 建立的箭端永遠是填滿的。

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 類別的新執行個體。 是否填滿箭端取決於傳遞至 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

適用於