MapSuiteGisEditor/WpfDesktopExtension/Shares/MapEngine.cs
/// <summary>This method returns an extent that is centered and zoomed out.</summary>
/// <returns>This method returns an extent that is centered and zoomed out.</returns>
/// <remarks>
/// The resulting rectangle will already be adjusted for the ratio of the screen. You
/// do not need to call GetDrawingExtent afterwards.
/// </remarks>
/// <overloads>
/// This overload allows you to pass in the height and width in screen coordinates,
/// as well as a world point.
/// </overloads>
/// <param name="worldExtent">This parameter is the world extent you want to center and zoom.</param>
/// <param name="percentage">This parameter is the percentage by which you want to zoom out.</param>
/// <param name="worldPoint">This parameter is the world point you want the extent to be centered 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 method returns an extent that is centered and zoomed out.
This method returns an extent that is centered and zoomed out .
public static RectangleShape ZoomOutToCenter(RectangleShape worldExtent, int percentage, PointShape worldPoint, float screenWidth, float screenHeight)
        {
            ValidatorHelper.CheckExtentIsValid(worldExtent, "worldExtent");
            ValidatorHelper.CheckInputValueIsLargerThan(percentage, "percentage", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckObjectIsNotNull(worldPoint, "worldPoint");
            ValidatorHelper.CheckInputValueIsLargerThan(screenWidth, "screenWidth", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckInputValueIsLargerThan(screenHeight, "screenHeight", 0, RangeCheckingInclusion.ExcludeValue);
            return ExtentHelper.ZoomOutToCenter(worldExtent, percentage, worldPoint, screenWidth, screenHeight);
        }
public static RectangleShape ZoomOutToCenter ( RectangleShape worldExtent , int percentage , PointShape worldPoint , float screenWidth , float screenHeight ) { ValidatorHelper . CheckExtentIsValid ( worldExtent , " " ) ; ValidatorHelper . CheckInputValueIsLargerThan ( percentage , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckObjectIsNotNull ( worldPoint , " " ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenWidth , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenHeight , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; return ExtentHelper . ZoomOutToCenter ( worldExtent , percentage , worldPoint , screenWidth , screenHeight ) ; }
This method returns an extent that is centered and zoomed out.
This method returns an extent that is centered and zoomed out .
This method returns an extent that is centered and zoomed out.
This method returns an extent that is centered and zoomed out .
worldExtent
RectangleShape
This parameter is the world extent you want to center and zoom.
This parameter is the world extent you want to center and zoom .
percentage
int
This parameter is the percentage by which you want to zoom out.
This parameter is the percentage by which you want to zoom out .
worldPoint
PointShape
This parameter is the world point you want the extent to be centered on.
This parameter is the world point you want the extent to be centered 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 .
remarks
The resulting rectangle will already be adjusted for the ratio of the screen. You
do not need to call GetDrawingExtent afterwards.
The resulting rectangle will already be adjusted for the ratio of the screen . You do not need to call GetDrawingExtent afterwards .
overloads
This overload allows you to pass in the height and width in screen coordinates,
as well as a world point.
This overload allows you to pass in the height and width in screen coordinates as well as a world point .