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
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.
Products |
Support |
Feedback: GetFixedAspectRatioImageRectangle Method - Leadtools.WinForms |
Introduction |
Help Version 19.0.2017.3.22
|
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.