DrawingContext.DrawLine 方法

定義

利用指定的 Pen 繪製線條。Draws a line with the specified Pen.

多載

DrawLine(Pen, Point, Point)

使用指定的 Pen,在指定的點之間繪製線條。Draws a line between the specified points using the specified Pen.

DrawLine(Pen, Point, AnimationClock, Point, AnimationClock)

使用指定的 Pen 在指定的點之間繪製線條,然後套用指定的動畫時鐘。Draws a line between the specified points using the specified Pen and applies the specified animation clocks.

DrawLine(Pen, Point, Point)

使用指定的 Pen,在指定的點之間繪製線條。Draws a line between the specified points using the specified Pen.

public:
 abstract void DrawLine(System::Windows::Media::Pen ^ pen, System::Windows::Point point0, System::Windows::Point point1);
public abstract void DrawLine (System.Windows.Media.Pen pen, System.Windows.Point point0, System.Windows.Point point1);
abstract member DrawLine : System.Windows.Media.Pen * System.Windows.Point * System.Windows.Point -> unit
Public MustOverride Sub DrawLine (pen As Pen, point0 As Point, point1 As Point)

參數

pen
Pen

用來將線條描邊的畫筆。The pen with which to stroke the line.

point0
Point

線條的起點。The start point of the line.

point1
Point

行的結束點。The end point of the line.

DrawLine(Pen, Point, AnimationClock, Point, AnimationClock)

使用指定的 Pen 在指定的點之間繪製線條,然後套用指定的動畫時鐘。Draws a line between the specified points using the specified Pen and applies the specified animation clocks.

public:
 abstract void DrawLine(System::Windows::Media::Pen ^ pen, System::Windows::Point point0, System::Windows::Media::Animation::AnimationClock ^ point0Animations, System::Windows::Point point1, System::Windows::Media::Animation::AnimationClock ^ point1Animations);
public abstract void DrawLine (System.Windows.Media.Pen pen, System.Windows.Point point0, System.Windows.Media.Animation.AnimationClock point0Animations, System.Windows.Point point1, System.Windows.Media.Animation.AnimationClock point1Animations);
abstract member DrawLine : System.Windows.Media.Pen * System.Windows.Point * System.Windows.Media.Animation.AnimationClock * System.Windows.Point * System.Windows.Media.Animation.AnimationClock -> unit
Public MustOverride Sub DrawLine (pen As Pen, point0 As Point, point0Animations As AnimationClock, point1 As Point, point1Animations As AnimationClock)

參數

pen
Pen

要用來將線條描邊的畫筆。The pen to stroke the line.

point0
Point

線條的起點。The start point of the line.

point0Animations
AnimationClock

用來建立線條起始點動畫的時鐘,不使用動畫則為 nullThe clock with which to animate the start point of the line, or null for no animation. 這個時鐘必須從可以將 AnimationTimeline 物件顯示為動畫的 Point 建立。This clock must be created from an AnimationTimeline that can animate Point objects.

point1
Point

行的結束點。The end point of the line.

point1Animations
AnimationClock

用來建立線條結束點動畫的時鐘,不使用動畫則為 nullThe clock with which to animate the end point of the line, or null for no animation. 這個時鐘必須從可以將 AnimationTimeline 物件顯示為動畫的 Point 建立。This clock must be created from an AnimationTimeline that can animate Point objects.

適用於