MapSuiteGisEditor/WpfDesktopExtension/Shares/MapEngine.cs
/// <summary>This is a static function that allows you to pass in a world rectangle, a point in screen coordinates
/// to center on, and a height and width in screen units.  The function will center the rectangle based on the
/// screen point, then adjust the rectangle's ratio based on the height and width in screen coordinates.
///</summary>
/// <overloads>This overload allows you to pass in a screen point as the center.</overloads>
/// <returns>This method returns an adjusted extent centered on a point.</returns>
/// <remarks>None</remarks>
/// <param name="worldExtent">This parameter is the current extent you want to center.</param>
/// <param name="screenX">This parameter is the X coordinate on the screen to center to.</param>
/// <param name="screenY">This parameter is the Y coordinate on the screen to center to.</param>
/// <param name="screenWidth">This parameter is the width of the screen.</param>
/// <param name="screenHeight">This parameter is the height of the screen.</param>
This is a static function that allows you to pass in a world rectangle, a point in screen coordinates
to center on, and a height and width in screen units.  The function will center the rectangle based on the
screen point, then adjust the rectangle's ratio based on the height and width in screen coordinates.
This is a static function that allows you to pass in a world rectangle a point in screen coordinates to center on and a height and width in screen units . The function will center the rectangle based on the screen point then adjust the rectangle ' s ratio based on the height and width in screen coordinates .
public static RectangleShape CenterAt(RectangleShape worldExtent, float screenX, float screenY, float screenWidth, float screenHeight)
        {
            ValidatorHelper.CheckExtentIsValid(worldExtent, "worldExtent");
            ValidatorHelper.CheckInputValueIsLargerThan(screenWidth, "screenWidth", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckInputValueIsLargerThan(screenHeight, "screenHeight", 0, RangeCheckingInclusion.ExcludeValue);
            return ExtentHelper.CenterAt(worldExtent, screenX, screenY, screenWidth, screenHeight);
        }
public static RectangleShape CenterAt ( RectangleShape worldExtent , float screenX , float screenY , float screenWidth , float screenHeight ) { ValidatorHelper . CheckExtentIsValid ( worldExtent , " " ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenWidth , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenHeight , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; return ExtentHelper . CenterAt ( worldExtent , screenX , screenY , screenWidth , screenHeight ) ; }
This is a static function that allows you to pass in a world rectangle, a point in screen coordinates
to center on, and a height and width in screen units.
This is a static function that allows you to pass in a world rectangle a point in screen coordinates to center on and a height and width in screen units .
This method returns an adjusted extent centered on a point.
This method returns an adjusted extent centered on a point .
worldExtent
RectangleShape
This parameter is the current extent you want to center.
This parameter is the current extent you want to center .
screenX
float
This parameter is the X coordinate on the screen to center to.
This parameter is the X coordinate on the screen to center to .
screenY
float
This parameter is the Y coordinate on the screen to center to.
This parameter is the Y coordinate on the screen to center to .
screenWidth
float
This parameter is the width of the screen.
This parameter is the width of the screen .
screenHeight
float
This parameter is the height of the screen.
This parameter is the height of the screen .
overloads
This overload allows you to pass in a screen point as the center.
This overload allows you to pass in a screen point as the center .
remarks
None