Share via


Graphics::D rawImage (Image*,constPointF&) 方法 (gdiplusgraphics.h)

Graphics::D rawImage 方法會繪製影像。

語法

Status DrawImage(
  Image          *image,
  const PointF & point
);

參數

image

指定來源影像之 Image 物件的指標。

point

PointF 對象的參考,指定繪製影像之目的地位置左上角的座標。

傳回值

如果方法成功,它會傳回 Ok,這是 Status 列舉的元素。

如果方法失敗,它會傳回 Status 列舉的其他其中一個專案。

備註

範例

下列範例會繪製影像。 影像是以 point 參數所指定的座標左上角繪製。

VOID Example_DrawImage8(HDC hdc)

{

   Graphics graphics(hdc);

   // Create an Image object.
   Image image(L"climber.jpg");

   // Draw the image.
   graphics.DrawImage(&image, PointF(0.0f, 0.0f));
}

規格需求

需求
標頭 gdiplusgraphics.h

另請參閱

繪製、定位和複製影像

圖形

映像

載入和顯示點陣圖

PointF