DrawingContext.DrawVideo 方法

定義

將視訊繪製至指定的區域。

多載

DrawVideo(MediaPlayer, Rect)

將視訊繪製至指定的區域。

DrawVideo(MediaPlayer, Rect, AnimationClock)

將視訊繪製至指定的區域,然後套用指定的動作時鐘。

DrawVideo(MediaPlayer, Rect)

將視訊繪製至指定的區域。

public:
 abstract void DrawVideo(System::Windows::Media::MediaPlayer ^ player, System::Windows::Rect rectangle);
public abstract void DrawVideo (System.Windows.Media.MediaPlayer player, System.Windows.Rect rectangle);
abstract member DrawVideo : System.Windows.Media.MediaPlayer * System.Windows.Rect -> unit
Public MustOverride Sub DrawVideo (player As MediaPlayer, rectangle As Rect)

參數

player
MediaPlayer

要繪製的媒體。

rectangle
Rect

要在其中繪製 player 的區域。

備註

請注意,媒體會延展以容納矩形參數所定義的區域內。 如果矩形和媒體有不同的外觀比例,就會發生失真。 如需媒體如何填滿區域的詳細資訊,請使用 DrawRectangle 命令繪製矩形,並以包含媒體的 填滿 VisualBrush

適用於

DrawVideo(MediaPlayer, Rect, AnimationClock)

將視訊繪製至指定的區域,然後套用指定的動作時鐘。

public:
 abstract void DrawVideo(System::Windows::Media::MediaPlayer ^ player, System::Windows::Rect rectangle, System::Windows::Media::Animation::AnimationClock ^ rectangleAnimations);
public abstract void DrawVideo (System.Windows.Media.MediaPlayer player, System.Windows.Rect rectangle, System.Windows.Media.Animation.AnimationClock rectangleAnimations);
abstract member DrawVideo : System.Windows.Media.MediaPlayer * System.Windows.Rect * System.Windows.Media.Animation.AnimationClock -> unit
Public MustOverride Sub DrawVideo (player As MediaPlayer, rectangle As Rect, rectangleAnimations As AnimationClock)

參數

player
MediaPlayer

要繪製的媒體。

rectangle
Rect

要在其中繪製媒體的區域。

rectangleAnimations
AnimationClock

用來建立矩形大小和維度動畫的時鐘,不使用動畫則為 null。 這個時鐘必須從可以將 AnimationTimeline 物件顯示為動畫的 Rect 建立。

備註

請注意,媒體會延展以容納矩形參數所定義的區域內。 如果矩形和媒體有不同的外觀比例,就會發生失真。 如需媒體如何填滿區域的詳細資訊,請使用 DrawRectangle 命令繪製矩形,並以包含媒體的 填滿 VisualBrush

適用於