MapSuiteGisEditor/WpfDesktopExtension/Shares/MapEngine.cs
/// <summary>This is a static function that allows you to pass in a world rectangle, a world point to center on, and a height
/// and width in screen units.  The function will center the rectangle based on the 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 world 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="worldPoint">This parameter is the world point you want to center on.</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 world point to center on, and a height
and width in screen units.  The function will center the rectangle based on the 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 world point to center on and a height and width in screen units . The function will center the rectangle based on the point then adjust the rectangle ' s ratio based on the height and width in screen coordinates .
public static RectangleShape CenterAt(RectangleShape worldExtent, PointShape worldPoint, float screenWidth, float screenHeight)
        {
            ValidatorHelper.CheckExtentIsValid(worldExtent, "worldExtent");
            ValidatorHelper.CheckObjectIsNotNull(worldPoint, "worldPoint");
            ValidatorHelper.CheckShapeIsValidForOperation(worldPoint);
            ValidatorHelper.CheckInputValueIsLargerThan(screenWidth, "screenWidth", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckInputValueIsLargerThan(screenHeight, "screenHeight", 0, RangeCheckingInclusion.ExcludeValue);
            return ExtentHelper.CenterAt(worldExtent, worldPoint, screenWidth, screenHeight);
        }
public static RectangleShape CenterAt ( RectangleShape worldExtent , PointShape worldPoint , float screenWidth , float screenHeight ) { ValidatorHelper . CheckExtentIsValid ( worldExtent , " " ) ; ValidatorHelper . CheckObjectIsNotNull ( worldPoint , " " ) ; ValidatorHelper . CheckShapeIsValidForOperation ( worldPoint ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenWidth , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenHeight , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; return ExtentHelper . CenterAt ( worldExtent , worldPoint , screenWidth , screenHeight ) ; }
This is a static function that allows you to pass in a world rectangle, a world point 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 world point 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 .
worldPoint
PointShape
This parameter is the world point you want to center on.
This parameter is the world point you want to center on .
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 world point as the center.
This overload allows you to pass in a world point as the center .
remarks
None