DrawingContext.DrawImage 方法

定義

將影像繪製到由指定之 Rect 定義的區域。

多載

DrawImage(ImageSource, Rect)

將影像繪製到由指定之 Rect 定義的區域。

DrawImage(ImageSource, Rect, AnimationClock)

將影像繪製至由指定之 Rect 定義的區域,然後套用指定的動畫時鐘。

DrawImage(ImageSource, Rect)

將影像繪製到由指定之 Rect 定義的區域。

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

參數

imageSource
ImageSource

要繪製的影像。

rectangle
Rect

要在其中繪製 bitmapSource 的區域。

適用於

DrawImage(ImageSource, Rect, AnimationClock)

將影像繪製至由指定之 Rect 定義的區域,然後套用指定的動畫時鐘。

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

參數

imageSource
ImageSource

要繪製的影像。

rectangle
Rect

要在其中繪製 bitmapSource 的區域。

rectangleAnimations
AnimationClock

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

適用於