语言

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 的对象创建此时钟。

适用于