Graphics.DrawImage
DrawImage(Image, int, int)
在由坐标对指定的位置绘制指定的图像,使用其原始物理尺寸。
public void DrawImage(Image sourceImage, int x, int y)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| x | Int32 | 绘制图像左上角的 x 坐标。 |
| y | Int32 | 绘制图像左上角的 y 坐标。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Rectangle)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, Rectangle rect)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rect | Rectangle | Rectangle 结构,指定已绘制图像的位置和大小。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, int, int, int, int)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, int x, int y, int width, int height)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| x | Int32 | 绘制图像左上角的 x 坐标。 |
| y | Int32 | 绘制图像左上角的 y 坐标。 |
| 宽度 | Int32 | 已绘制图像的宽度。 |
| 高度 | Int32 | 已绘制图像的高度。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, PointF)
在指定的位置绘制指定的Image,使用其原始物理尺寸。
public void DrawImage(Image sourceImage, PointF point)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| point | PointF | PointF 结构,表示已绘制图像的左上角。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, float, float)
在指定的位置绘制指定的Image,使用其原始物理尺寸。
public void DrawImage(Image sourceImage, float x, float y)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| x | 单精度 | 绘制图像左上角的 x 坐标。 |
| y | 单精度 | 绘制图像左上角的 y 坐标。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, RectangleF)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, RectangleF rect)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rect | RectangleF | RectangleF 结构,指定已绘制图像的位置和大小。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Rectangle, GraphicsUnit)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectDestination | Rectangle | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, RectangleF, GraphicsUnit)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectDestination | RectangleF | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Rectangle, GraphicsUnit, ImageAttributes)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit,
ImageAttributes imageAttributes)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectDestination | Rectangle | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
| imageAttributes | ImageAttributes | 图像属性。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, RectangleF, GraphicsUnit, ImageAttributes)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit,
ImageAttributes imageAttributes)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectDestination | RectangleF | 用于绘制的目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
| imageAttributes | ImageAttributes | 图像属性。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Rectangle, Rectangle, GraphicsUnit)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination,
GraphicsUnit graphicsUnit)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectSource | Rectangle | 源矩形。 |
| rectDestination | Rectangle | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination,
GraphicsUnit graphicsUnit)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectSource | RectangleF | 源矩形。 |
| rectDestination | RectangleF | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Rectangle, Rectangle, GraphicsUnit, ImageAttributes)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination,
GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectSource | Rectangle | 源矩形。 |
| rectDestination | Rectangle | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 图形单位。 |
| imageAttributes | ImageAttributes | 图像属性。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes)
在指定的位置并使用指定的大小绘制指定的Image。
public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination,
GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| rectSource | RectangleF | 源矩形。 |
| rectDestination | RectangleF | 目标矩形。 |
| graphicsUnit | GraphicsUnit | 要使用的图形单位。 |
| imageAttributes | ImageAttributes | 要使用的图像属性。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Point[])
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, Point[] destPoints)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | Point[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
另请参见
DrawImage(Image, Point[], Rectangle)
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | Point[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
| srcRect | Rectangle | 源矩形。 |
另请参见
DrawImage(Image, Point[], Rectangle, GraphicsUnit)
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | Point[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
| srcRect | Rectangle | 源矩形。 |
| srcUnit | GraphicsUnit | 度量单位。 |
另请参见
DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes)
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit,
ImageAttributes imageAttributes)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | Point[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
| srcRect | Rectangle | 源矩形。 |
| srcUnit | GraphicsUnit | 度量单位。 |
| imageAttributes | ImageAttributes | 图像属性。 |
另请参见
DrawImage(Image, PointF[])
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, PointF[] destPoints)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | PointF[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | image |
另请参见
DrawImage(Image, PointF[], RectangleF)
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | PointF[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
| srcRect | RectangleF | 源矩形。 |
另请参见
DrawImage(Image, PointF[], RectangleF, GraphicsUnit)
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | PointF[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
| srcRect | RectangleF | 源矩形。 |
| srcUnit | GraphicsUnit | 度量单位。 |
另请参见
DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes)
在指定位置并使用指定尺寸绘制指定 image 的指定部分。
public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit,
ImageAttributes imageAttributes)
| 参数 | 类型 | 描述 |
|---|
| image | 图像 | 要绘制的图像。 |
| destPoints | PointF[] | 由三个 PointF 结构组成的数组,用于定义平行四边形。 |
| srcRect | RectangleF | 源矩形。 |
| srcUnit | GraphicsUnit | 度量单位。 |
| imageAttributes | ImageAttributes | 图像属性。 |
另请参见
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 坐标。 |
| 宽度 | 单精度 | 已绘制图像的宽度。 |
| 高度 | 单精度 | 已绘制图像的高度。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见
DrawImage(Image, Point)
在指定的位置绘制指定的Image,使用其原始物理尺寸。
public void DrawImage(Image sourceImage, Point point)
| 参数 | 类型 | 描述 |
|---|
| sourceImage | 图像 | 用于绘制的图像。 |
| point | Point | Point 结构,表示绘制图像左上角的位置。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | sourceImage 为 null。 |
另请参见