GdipDrawImageRect

GdipDrawImageRect ts、GdipDrawImagePoin tsI、GdipDrawImagePoin

GdipDrawImageRect

VB聲明:

Declare Function GdipDrawImageRect(Graphics As Long, Image As Long, X As Single, Y As Single, Width As Single, Height As Single) As GpStatus

函式說明:向Graphics對象輸出Image

參數:

Graphics:Graphics對象,可調用GdipCreateFromHDC函式創建

image:image對象,可由GdipLoadImageFromFile載入的圖像檔案,相比較gdi函式LoadImage而言,GdipDrawImageRect可以載入包括點陣圖外如jpg等當前主流圖片格式。

X:顯示起始位置X坐標,對應圖像的左上角

Y:顯示起始位置Y坐標,對應圖像的左上角

Width:圖像寬度,可調用GdipGetImageWidth函式獲取圖像實際寬度賦值

Height:圖像高度,可調用GdipGetImageHeight函式獲取圖像實際高度賦值

返回值:GpStatus類型值

說明:Width、Height假如等於圖片的實際尺寸,那圖片將按原大小顯示,否則將按新尺寸進行縮放。

該方法被重載,可參閱:GdipDrawImage、GdipDrawImageI、GdipDrawImagePointRect、GdipDrawImagePointRectI、GdipDrawImagePoints、GdipDrawImagePointsI、GdipDrawImagePointsRectI、GdipDrawImageRectI、GdipDrawImageRectRect、GdipDrawImageRectRectI

備註:.net平台封裝了該方法在Graphics類中

相關詞條

相關搜尋

熱門詞條

聯絡我們