Share via


Graphics::D rawImage (Image*,constRectF&,constRectF&,Unit,constImageAttributes*) 方法 (gdiplusgraphics.h)

Graphics::D rawImage 方法會在指定的位置繪製影像的指定部分。

語法

Status DrawImage(
  [in]      Image                 *image,
  [in, ref] const RectF &         destRect,
  [in, ref] const RectF &         sourceRect,
  [in]      Unit                  srcUnit,
  [in]      const ImageAttributes *imageAttributes
);

參數

[in] image

類型: 影像*

Image 物件的指標,指定要繪製的影像。

[in, ref] destRect

類型: RectF

矩形,以像素為單位,指定轉譯影像的界限。 sourceRect 所指定的影像部分會縮放為填滿 destRect 所指定的矩形。

[in, ref] sourceRect

類型: RectF

矩形,指定要繪製的影像部分。

[in] srcUnit

類型: 單位

Unit 列舉的 元素,指定來源矩形的測量單位。

[in] imageAttributes

類型: ImageAttributes*

選擇性。 ImageAttributes 物件的指標,指定要在轉譯影像時套用的色彩調整。 預設值是 NULL

傳回值

類型: 狀態

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

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

規格需求

   
最低支援的用戶端 Windows Vista [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 [僅限傳統型應用程式]
目標平台 Windows
標頭 gdiplusgraphics.h (包含 Gdiplus.h)
程式庫 Gdiplus.lib
Dll Gdiplus.dll

另請參閱

繪製、定位和複製影像

圖形

映像

載入和顯示點陣圖