CalculateBackgroundImageRectangle 方法

計算具有指定版面配置的背景影像位置和大小,例如延展、置中或縮放。

語法

internal static Rectangle CalculateBackgroundImageRectangle(Rectangle bounds, Image backgroundImage, ImageLayout imageLayout)

參數

bounds
backgroundImage 的用戶端矩形。

backgroundImage
要計算其位置和大小的影像。 如果為 null,則會傳回用戶端矩形 bounds

imageLayout
其中一個列舉值,指定相對於 bounds 的背景影像位置。

傳回

Rectangle
具有指定配置的指定背景影像位置和大小。

警告

CalculateBackgroundImageRectangle 方法是內部方法,不建議直接用於您的程式碼。

Microsoft 在任何情況下都不支援在實際執行應用程式中使用此方法。

規格需求

命名空間︰System.Windows.Forms

組件:System.Windows.Forms (在 System.Windows.Forms.dll 中)

NET Framework 版本:1.0 版以上提供。

另請參閱