GraphicsDrawImage Method (Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.9.0.0 (20.9.0)
Syntax
C#
public void DrawImage(
	Image image,
	Rectangle destRect,
	int srcX,
	int srcY,
	int srcWidth,
	int srcHeight,
	GraphicsUnit srcUnit
)

Parameters

image
Type: System.DrawingImage
Image to draw.
destRect
Type: System.DrawingRectangle
Rectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcX
Type: SystemInt32
The x-coordinate of the upper-left corner of the portion of the source image to draw.
srcY
Type: SystemInt32
The y-coordinate of the upper-left corner of the portion of the source image to draw.
srcWidth
Type: SystemInt32
Width of the portion of the source image to draw.
srcHeight
Type: SystemInt32
Height of the portion of the source image to draw
srcUnit
Type: System.DrawingGraphicsUnit
Member of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.
See Also