DrawingContext.DrawImage 方法

定義

將影像繪製到由指定之 Rect 定義的區域。Draws an image into the region defined by the specified Rect.

多載

DrawImage(ImageSource, Rect)

將影像繪製到由指定之 Rect 定義的區域。Draws an image into the region defined by the specified Rect.

DrawImage(ImageSource, Rect, AnimationClock)

將影像繪製至由指定之 Rect 定義的區域,然後套用指定的動畫時鐘。Draws an image into the region defined by the specified Rect and applies the specified animation clock.

DrawImage(ImageSource, Rect)

將影像繪製到由指定之 Rect 定義的區域。Draws an image into the region defined by the specified 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

參數

imageSource
ImageSource

要繪製的影像。The image to draw.

rectangle
Rect

要在其中繪製 bitmapSource 的區域。The region in which to draw bitmapSource.

DrawImage(ImageSource, Rect, AnimationClock)

將影像繪製至由指定之 Rect 定義的區域,然後套用指定的動畫時鐘。Draws an image into the region defined by the specified Rect and applies the specified animation clock.

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

參數

imageSource
ImageSource

要繪製的影像。The image to draw.

rectangle
Rect

要在其中繪製 bitmapSource 的區域。The region in which to draw bitmapSource.

rectangleAnimations
AnimationClock

用來建立矩形大小和維度動畫的時鐘,不使用動畫則為 nullThe clock with which to animate the rectangle's size and dimensions, or null for no animation. 這個時鐘必須從可以將 AnimationTimeline 物件顯示為動畫的 Rect 建立。This clock must be created from an AnimationTimeline that can animate Rect objects.

適用於