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.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈