Package org.openstreetmap.josm.gui
Class MapScaler.TickMarks
- java.lang.Object
-
- org.openstreetmap.josm.gui.MapScaler.TickMarks
-
- Enclosing class:
- MapScaler
private static final class MapScaler.TickMarks extends Object
This class finds the best possible tick mark positions.It will attempt to use steps of 1m, 2.5m, 10m, 25m, ...
-
-
Field Summary
Fields Modifier and Type Field Description private double
dist100Pixel
private int
minorStepsPerMajor
private double
spacingMeter
Distance in meters between two ticks.private int
steps
-
Constructor Summary
Constructors Constructor Description TickMarks(double dist100Pixel, int width)
Creates a new tick mark helper.
-
-
-
Field Detail
-
dist100Pixel
private final double dist100Pixel
-
spacingMeter
private final double spacingMeter
Distance in meters between two ticks.
-
steps
private final int steps
-
minorStepsPerMajor
private final int minorStepsPerMajor
-
-
Constructor Detail
-
TickMarks
TickMarks(double dist100Pixel, int width)
Creates a new tick mark helper.- Parameters:
dist100Pixel
- The distance of 100 pixel on the map.width
- The width of the mark.
-
-
Method Detail
-
paintTicks
public void paintTicks(Graphics g)
Paint the ticks to the graphics.- Parameters:
g
- The graphics to paint on.
-
-