Graphics::D rawImage 方法绘制图像。
语法
Status DrawImage(
  [in] Image        *image,
  [in] const PointF *destPoints,
  [in] INT          count
);
parameters
[in] image
类型: 图像*
指向指定源 图像的 Image 对象的指针。
[in] destPoints
类型: const PointF*
指向 PointF 对象数组的指针,这些对象在平行四边形中指定要在其中绘制图像的区域。
[in] count
类型: INT
指定 destPoints 数组中的元素数的整数。
返回值
类型: 状态
如果该方法成功,则返回 Ok,这是 Status 枚举的元素。
如果方法失败,它将返回 Status 枚举的其他元素之一。
注解
count 参数的值必须等于 3,以指定平行四边形左上角、右上角和左下角的坐标。 使用给定的三个坐标、宽度和图像高度计算右下角的坐标。 缩放图像以适应平行四边形。
示例
以下示例绘制图像。
VOID Example_DrawImage3(HDC hdc)
{
   Graphics graphics(hdc);
   // Create an Image object.
   Image image(L"climber.jpg");
   // Create an array of PointF objects that specify the destination of the image.
   PointF destPoints[3] = {
   PointF(30.0f, 30.0f),
   PointF(250.0f, 50.0f),
   PointF(175.0f, 120.0f)};
   PointF* pdestPoints = destPoints;
   // Draw the image.
   graphics.DrawImage(&image, pdestPoints, 3);
}
下图显示了上述代码的输出。
              
            
要求
| 最低受支持的客户端 | Windows XP、Windows 2000 Professional [仅限桌面应用] | 
| 最低受支持的服务器 | Windows 2000 Server [仅限桌面应用] | 
| 目标平台 | Windows | 
| 标头 | gdiplusgraphics.h (包括 Gdiplus.h) | 
| Library | Gdiplus.lib | 
| DLL | Gdiplus.dll |