共用方式為


AdjustableArrowCap 建構函式

定義

使用指定的寬度和高度,初始化 AdjustableArrowCap 類別的新實例。

多載

AdjustableArrowCap(Single, Single)

使用指定的寬度和高度,初始化 AdjustableArrowCap 類別的新實例。 使用這個建構函式建立的箭號端點一律會填滿。

AdjustableArrowCap(Single, Single, Boolean)

使用指定的寬度、高度和 fill 屬性,初始化 AdjustableArrowCap 類別的新實例。 是否填滿箭頭端點上限取決於傳遞至 isFilled 參數的自變數。

AdjustableArrowCap(Single, Single)

來源:
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 搭配使用,而且需要 PaintEventArgseOnPaint 事件物件。 程式代碼會執行下列動作:

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

使用指定的寬度、高度和 fill 屬性,初始化 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 搭配使用,而且需要 PaintEventArgseOnPaint 事件物件。 程式代碼會執行下列動作:

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

適用於