Visual Basic (Declaration) | |
---|---|
Public Shared Function CalculatePaintModeRectangle( _ ByVal sourceWidth As Integer, _ ByVal sourceHeight As Integer, _ ByVal destinationRectangle As Rectangle, _ ByVal sizeMode As RasterPaintSizeMode, _ ByVal horizontalAlignMode As RasterPaintAlignMode, _ ByVal verticalAlignMode As RasterPaintAlignMode _ ) As Rectangle |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public static Rectangle CalculatePaintModeRectangle( int sourceWidth, int sourceHeight, Rectangle destinationRectangle, RasterPaintSizeMode sizeMode, RasterPaintAlignMode horizontalAlignMode, RasterPaintAlignMode verticalAlignMode ) |
Managed Extensions for C++ | |
---|---|
public: static Rectangle CalculatePaintModeRectangle( int sourceWidth, int sourceHeight, Rectangle destinationRectangle, RasterPaintSizeMode sizeMode, RasterPaintAlignMode horizontalAlignMode, RasterPaintAlignMode verticalAlignMode ) |
C++/CLI | |
---|---|
public: static Rectangle CalculatePaintModeRectangle( int sourceWidth, int sourceHeight, Rectangle destinationRectangle, RasterPaintSizeMode sizeMode, RasterPaintAlignMode horizontalAlignMode, RasterPaintAlignMode verticalAlignMode ) |
Parameters
- sourceWidth
- The width of the source rectangle.
- sourceHeight
- The height of the source rectangle.
- destinationRectangle
- Destination rectangle.
- sizeMode
- Controls how the source rectangle is positioned inside the destination rectangle.
- horizontalAlignMode
- Controls how the source rectangle is aligned horizontally inside the destination rectangle.
- verticalAlignMode
- Controls how the source rectangle is aligned vertically inside the destination rectangle.
Return Value
The new destination rectangle adjusted based on the size mode and alignment.This method allows you to calculate how a source rectangle can be adjusted into a destination rectangle based on a size mode and alignment.
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family