110,567
社区成员
发帖
与我相关
我的任务
分享
//
// 摘要:
// 在指定位置并且按指定大小绘制指定的 System.Drawing.Image 的指定部分。
//
// 参数:
// image:
// 要绘制的 System.Drawing.Image。
//
// destRect:
// System.Drawing.Rectangle 结构,它指定所绘制图像的位置和大小。将图像进行缩放以适合该矩形。
//
// srcX:
// 要绘制的源图像部分的左上角的 x 坐标。
//
// srcY:
// 要绘制的源图像部分的左上角的 y 坐标。
//
// srcWidth:
// 要绘制的源图像部分的宽度。
//
// srcHeight:
// 要绘制的源图像部分的高度。
//
// srcUnit:
// System.Drawing.GraphicsUnit 枚举的成员,它指定用于确定源矩形的度量单位。
//
// 异常:
// System.ArgumentNullException:
// image 为 null。
public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit);
g.DrawImage(pic, new Rectangle(0, 0, save.Width, save.Height), x*startX, x*startY, 2 * startX, 2 * startY, GraphicsUnit.Pixel);
大概就是这样