Calculates how an image is to be sized and positioned in a rectangle while keeping the aspect ratio fixed.
public static Rectangle GetFixedAspectRatioImageRectangle(
int imageWidth,
int imageHeight,
Rectangle imageRect
)
Public Shared Function GetFixedAspectRatioImageRectangle( _
ByVal imageWidth As Integer, _
ByVal imageHeight As Integer, _
ByVal imageRect As Rectangle _
) As Rectangle
public:
static Rectangle GetFixedAspectRatioImageRectangle(
int imageWidth,
int imageHeight,
Rectangle imageRect
)
imageWidth
Width of the image in pixels
imageHeight
Height of the image in pixels
imageRect
The source rectangle
A System.Drawing.Rectangle structure that specifies where the image is to be positioned and sized in imageRect while keeping the aspect ratio fixed.
When the RasterImageList class draws an item image, it tries to fit the image into the item image rectangle while maintaining the aspect ratio. The control internally calls this method to calculate these values.
For an example, refer to DrawItem.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET