MapSuiteGisEditor/WpfDesktopExtension/Shares/MapEngine.cs
/// <summary>This method returns the number of pixels between two world points.</summary>
/// <returns>This method returns the number of pixels between two world points.</returns>
/// <remarks>None</remarks>
/// <param name="worldExtent">This parameter is the world extent.</param>
/// <param name="worldPoint1">This parameter is the first point -- the one you want to measure from.</param>
/// <param name="worldPoint2">This parameter is the second point -- the one you want to measure 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 method returns the number of pixels between two world points.
This method returns the number of pixels between two world points .
public static float GetScreenDistanceBetweenTwoWorldPoints(RectangleShape worldExtent, PointShape worldPoint1, PointShape worldPoint2, float screenWidth, float screenHeight)
        {
            ValidatorHelper.CheckExtentIsValid(worldExtent, "worldExtent");
            ValidatorHelper.CheckObjectIsNotNull(worldPoint1, "worldPoint1");
            ValidatorHelper.CheckObjectIsNotNull(worldPoint2, "worldPoint2");
            ValidatorHelper.CheckInputValueIsLargerThan(screenWidth, "screenWidth", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckInputValueIsLargerThan(screenHeight, "screenHeight", 0, RangeCheckingInclusion.ExcludeValue);
            return ExtentHelper.GetScreenDistanceBetweenTwoWorldPoints(worldExtent, worldPoint1, worldPoint2, screenWidth, screenHeight);
        }
public static float GetScreenDistanceBetweenTwoWorldPoints ( RectangleShape worldExtent , PointShape worldPoint1 , PointShape worldPoint2 , float screenWidth , float screenHeight ) { ValidatorHelper . CheckExtentIsValid ( worldExtent , " " ) ; ValidatorHelper . CheckObjectIsNotNull ( worldPoint1 , " " ) ; ValidatorHelper . CheckObjectIsNotNull ( worldPoint2 , " " ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenWidth , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenHeight , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; return ExtentHelper . GetScreenDistanceBetweenTwoWorldPoints ( worldExtent , worldPoint1 , worldPoint2 , screenWidth , screenHeight ) ; }
This method returns the number of pixels between two world points.
This method returns the number of pixels between two world points .
This method returns the number of pixels between two world points.
This method returns the number of pixels between two world points .
worldExtent
RectangleShape
This parameter is the world extent.
This parameter is the world extent .
worldPoint1
PointShape
This parameter is the first point -- the one you want to measure from.
This parameter is the first point -- the one you want to measure from .
worldPoint2
PointShape
This parameter is the second point -- the one you want to measure to.
This parameter is the second point -- the one you want to measure 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 .
remarks
None