DrawingContext.DrawImage 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將影像繪製到指定 Rect區域。
多載
| 名稱 | Description |
|---|---|
| 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 物件有生命的機器製作。