Package org.openjump.core.ui.util
Class ScreenScale
- java.lang.Object
-
- org.openjump.core.ui.util.ScreenScale
-
public class ScreenScale extends Object
Contains function for accessing the actual map scale of the screen- Author:
- sstein
-
-
Constructor Summary
Constructors Constructor Description ScreenScale()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublegetHorizontalMapScale(Viewport port)Delivers the scale of the map shown on the display.static intgetResolution()static voidsetResolution(int res)
-
-
-
Method Detail
-
getResolution
public static int getResolution()
-
setResolution
public static void setResolution(int res)
-
getHorizontalMapScale
public static double getHorizontalMapScale(Viewport port)
Delivers the scale of the map shown on the display. The scale is calculated for the horizontal map directionnote: The scale may differ for horizontal and vertical direction due to the type of map projection.
- Parameters:
port- the viewport- Returns:
- actual scale
-
-