private static final class MapScaler.TickMarks extends java.lang.Object
It will attempt to use steps of 1m, 2.5m, 10m, 25m, ...
Modifier and Type | Field and Description |
---|---|
private double |
dist100Pixel |
private double |
lineDistance |
private int |
minorStepsPerMajor |
private double |
spacingMeter
Distance in meters between two ticks.
|
private int |
steps |
Constructor and Description |
---|
TickMarks(double dist100Pixel,
int width)
Creates a new tick mark helper.
|
Modifier and Type | Method and Description |
---|---|
void |
paintTicks(java.awt.Graphics g)
Paint the ticks to the graphics.
|
private final double dist100Pixel
private final double lineDistance
private final double spacingMeter
private final int steps
private final int minorStepsPerMajor
TickMarks(double dist100Pixel, int width)
dist100Pixel
- The distance of 100 pixel on the map.width
- The width of the mark.public void paintTicks(java.awt.Graphics g)
g
- The graphics to paint on.