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

Draws a portion of an image at a specified location.

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,
	int x,
	int y,
	Rectangle srcRect,
	GraphicsUnit srcUnit
)

Parameters

image
Type: System.DrawingImage
Image to draw.
x
Type: SystemInt32
The x-coordinate of the upper-left corner of the drawn image.
y
Type: SystemInt32
The y-coordinate of the upper-left corner of the drawn image.
srcRect
Type: System.DrawingRectangle
Rectangle structure that specifies the portion of the image object to draw.
srcUnit
Type: System.DrawingGraphicsUnit
Member of the GraphicsUnit enumeration that specifies the units of measure used by the srcRect parameter.
See Also