Graphics.DrawImage

DrawImage(Image, int, int)

在由坐标对指定的位置绘制指定的图像,使用其原始物理尺寸。

public void DrawImage(Image sourceImage, int x, int y)
参数类型描述
sourceImage图像用于绘制的图像。
xInt32绘制图像左上角的 x 坐标。
yInt32绘制图像左上角的 y 坐标。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Rectangle)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, Rectangle rect)
参数类型描述
sourceImage图像用于绘制的图像。
rectRectangleRectangle 结构,指定已绘制图像的位置和大小。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, int, int, int, int)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, int x, int y, int width, int height)
参数类型描述
sourceImage图像用于绘制的图像。
xInt32绘制图像左上角的 x 坐标。
yInt32绘制图像左上角的 y 坐标。
宽度Int32已绘制图像的宽度。
高度Int32已绘制图像的高度。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, PointF)

在指定的位置绘制指定的Image,使用其原始物理尺寸。

public void DrawImage(Image sourceImage, PointF point)
参数类型描述
sourceImage图像用于绘制的图像。
pointPointFPointF 结构,表示已绘制图像的左上角。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, float, float)

在指定的位置绘制指定的Image,使用其原始物理尺寸。

public void DrawImage(Image sourceImage, float x, float y)
参数类型描述
sourceImage图像用于绘制的图像。
x单精度绘制图像左上角的 x 坐标。
y单精度绘制图像左上角的 y 坐标。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, RectangleF)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, RectangleF rect)
参数类型描述
sourceImage图像用于绘制的图像。
rectRectangleFRectangleF 结构,指定已绘制图像的位置和大小。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Rectangle, GraphicsUnit)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit)
参数类型描述
sourceImage图像用于绘制的图像。
rectDestinationRectangle目标矩形。
graphicsUnitGraphicsUnit图形单位。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, RectangleF, GraphicsUnit)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit)
参数类型描述
sourceImage图像用于绘制的图像。
rectDestinationRectangleF目标矩形。
graphicsUnitGraphicsUnit图形单位。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Rectangle, GraphicsUnit, ImageAttributes)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit, 
    ImageAttributes imageAttributes)
参数类型描述
sourceImage图像用于绘制的图像。
rectDestinationRectangle目标矩形。
graphicsUnitGraphicsUnit图形单位。
imageAttributesImageAttributes图像属性。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, RectangleF, GraphicsUnit, ImageAttributes)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit, 
    ImageAttributes imageAttributes)
参数类型描述
sourceImage图像用于绘制的图像。
rectDestinationRectangleF用于绘制的目标矩形。
graphicsUnitGraphicsUnit图形单位。
imageAttributesImageAttributes图像属性。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Rectangle, Rectangle, GraphicsUnit)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, 
    GraphicsUnit graphicsUnit)
参数类型描述
sourceImage图像用于绘制的图像。
rectSourceRectangle源矩形。
rectDestinationRectangle目标矩形。
graphicsUnitGraphicsUnit图形单位。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, RectangleF, RectangleF, GraphicsUnit)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, 
    GraphicsUnit graphicsUnit)
参数类型描述
sourceImage图像用于绘制的图像。
rectSourceRectangleF源矩形。
rectDestinationRectangleF目标矩形。
graphicsUnitGraphicsUnit图形单位。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Rectangle, Rectangle, GraphicsUnit, ImageAttributes)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, 
    GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
参数类型描述
sourceImage图像用于绘制的图像。
rectSourceRectangle源矩形。
rectDestinationRectangle目标矩形。
graphicsUnitGraphicsUnit图形单位。
imageAttributesImageAttributes图像属性。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, 
    GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
参数类型描述
sourceImage图像用于绘制的图像。
rectSourceRectangleF源矩形。
rectDestinationRectangleF目标矩形。
graphicsUnitGraphicsUnit要使用的图形单位。
imageAttributesImageAttributes要使用的图像属性。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Point[])

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, Point[] destPoints)
参数类型描述
image图像要绘制的图像。
destPointsPoint[]由三个 PointF 结构组成的数组,用于定义平行四边形。

另请参见


DrawImage(Image, Point[], Rectangle)

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect)
参数类型描述
image图像要绘制的图像。
destPointsPoint[]由三个 PointF 结构组成的数组,用于定义平行四边形。
srcRectRectangle源矩形。

另请参见


DrawImage(Image, Point[], Rectangle, GraphicsUnit)

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit)
参数类型描述
image图像要绘制的图像。
destPointsPoint[]由三个 PointF 结构组成的数组,用于定义平行四边形。
srcRectRectangle源矩形。
srcUnitGraphicsUnit度量单位。

另请参见


DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes)

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, 
    ImageAttributes imageAttributes)
参数类型描述
image图像要绘制的图像。
destPointsPoint[]由三个 PointF 结构组成的数组,用于定义平行四边形。
srcRectRectangle源矩形。
srcUnitGraphicsUnit度量单位。
imageAttributesImageAttributes图像属性。

另请参见


DrawImage(Image, PointF[])

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, PointF[] destPoints)
参数类型描述
image图像要绘制的图像。
destPointsPointF[]由三个 PointF 结构组成的数组,用于定义平行四边形。

异常

异常条件
ArgumentNullExceptionimage

另请参见


DrawImage(Image, PointF[], RectangleF)

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect)
参数类型描述
image图像要绘制的图像。
destPointsPointF[]由三个 PointF 结构组成的数组,用于定义平行四边形。
srcRectRectangleF源矩形。

另请参见


DrawImage(Image, PointF[], RectangleF, GraphicsUnit)

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)
参数类型描述
image图像要绘制的图像。
destPointsPointF[]由三个 PointF 结构组成的数组,用于定义平行四边形。
srcRectRectangleF源矩形。
srcUnitGraphicsUnit度量单位。

另请参见


DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes)

在指定位置并使用指定尺寸绘制指定 image 的指定部分。

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, 
    ImageAttributes imageAttributes)
参数类型描述
image图像要绘制的图像。
destPointsPointF[]由三个 PointF 结构组成的数组,用于定义平行四边形。
srcRectRectangleF源矩形。
srcUnitGraphicsUnit度量单位。
imageAttributesImageAttributes图像属性。

另请参见


DrawImage(Image, float, float, float, float)

在指定的位置并使用指定的大小绘制指定的Image

public void DrawImage(Image sourceImage, float x, float y, float width, float height)
参数类型描述
sourceImage图像用于绘制的图像。
x单精度绘制图像左上角的 x 坐标。
y单精度绘制图像左上角的 y 坐标。
宽度单精度已绘制图像的宽度。
高度单精度已绘制图像的高度。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见


DrawImage(Image, Point)

在指定的位置绘制指定的Image,使用其原始物理尺寸。

public void DrawImage(Image sourceImage, Point point)
参数类型描述
sourceImage图像用于绘制的图像。
pointPointPoint 结构,表示绘制图像左上角的位置。

异常

异常条件
ArgumentNullExceptionsourceImage 为 null。

另请参见