Changeset 11704 in josm for trunk/src/org
- Timestamp:
- 2017-03-09T00:21:54+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r11702 r11704 740 740 741 741 // alpha value is based on zoom and line with combined with global layer alpha 742 float theLineAlpha = Math.min(Math.max((0.50f/(float) zoomScale)/(globalLineWidth + 1), 0.01f), 0.50f) * layerAlpha;742 float theLineAlpha = (float) Utils.clamp((0.50 / zoomScale) / (globalLineWidth + 1), 0.01, 0.50) * layerAlpha; 743 743 final int theLineWith = (int) (lineWidth / zoomScale) + 1; 744 744 … … 1192 1192 1193 1193 // global alpha adjustment 1194 float lineAlpha = Math.min(Math.max((0.40f/(float) zoomScale)/(globalLineWidth+1), 0.01f), 0.40f);1194 float lineAlpha = (float) Utils.clamp((0.40 / zoomScale) / (globalLineWidth + 1), 0.01, 0.40); 1195 1195 1196 1196 // adjust 0.15 .. 1.85 … … 1198 1198 1199 1199 // add to calculated values 1200 float lineAlphaBPoint = Math.max(Math.min(((lineAlpha * 0.65f) * scaleAlpha), 0.90f), 0.001f);1201 float lineAlphaBLine = Math.max(Math.min(((lineAlpha * 1.00f) * scaleAlpha), 0.90f), 0.001f);1202 float lineAlphaFLine = Math.max(Math.min(((lineAlpha / 1.50f) * scaleAlpha), 0.90f), 0.001f);1200 float lineAlphaBPoint = (float) Utils.clamp((lineAlpha * 0.65) * scaleAlpha, 0.001, 0.90); 1201 float lineAlphaBLine = (float) Utils.clamp((lineAlpha * 1.00) * scaleAlpha, 0.001, 0.90); 1202 float lineAlphaFLine = (float) Utils.clamp((lineAlpha / 1.50) * scaleAlpha, 0.001, 0.90); 1203 1203 1204 1204 // 3rd Calculate the heat map data by draw GPX traces with alpha value ----------
Note:
See TracChangeset
for help on using the changeset viewer.