DrawingContext.DrawImage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Public MustOverride Sub DrawImage (imageSource As ImageSource, rectangle As Rect)
Parameters
- imageSource
- ImageSource
The image to draw.
- rectangle
- Rect
The region in which to draw bitmapSource
.
Applies to
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
Public MustOverride Sub DrawImage (imageSource As ImageSource, rectangle As Rect, rectangleAnimations As AnimationClock)
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.