DrawingContext.DrawImage Method

Definition

Draws an image into the region defined by the specified Rect.

Overloads

DrawImage(ImageSource, Rect)

Draws an image into the region defined by the specified Rect.

DrawImage(ImageSource, Rect, AnimationClock)

Draws an image into the region defined by the specified Rect and applies the specified animation clock.

DrawImage(ImageSource, 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

Parameters

imageSource
ImageSource

The image to draw.

rectangle
Rect

The region in which to draw bitmapSource.

DrawImage(ImageSource, Rect, AnimationClock)

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

Parameters

imageSource
ImageSource

The image to draw.

rectangle
Rect

The region in which to draw bitmapSource.

rectangleAnimations
AnimationClock

The clock with which to animate the rectangle's size and dimensions, or null for no animation. This clock must be created from an AnimationTimeline that can animate Rect objects.

Applies to