Skip to content

Commit 08fd040

Browse files
committed
Introduce new detail level 6.
1 parent f4a2387 commit 08fd040

File tree

2 files changed

+54
-10
lines changed

2 files changed

+54
-10
lines changed

src/railway/measures.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,47 @@ pub const BASE_D4: Measures = Measures([
347347
5.4, // badge font
348348
]);
349349

350+
/// The standard measures for detail level 4.
351+
pub const BASE_D5: Measures = Measures([
352+
2.0, // dt
353+
1.2, // main track
354+
1.2, // main double
355+
1.4, // main skip
356+
0.8, // light track
357+
0.8, // light double
358+
1.2, // light skip
359+
0.3, // guide width
360+
0.4, // border width
361+
12., // seg = 6dt
362+
6., // sw
363+
6., // sh
364+
5., // xsmall font
365+
6., // small font
366+
7., // medium font
367+
9., // large font
368+
11., // xlarge font
369+
5.4, // badge font
370+
]);
371+
372+
/// The standard measures for detail level 5.
373+
pub const BASE_D6: Measures = Measures([
374+
2.0, // dt
375+
1.2, // main track
376+
1.1, // main double
377+
3.8, // main skip
378+
1.0, // light track
379+
0.6, // light double
380+
1.4, // light skip
381+
0.3, // guide width
382+
0.4, // border width
383+
12., // seg = 6dt
384+
6., // sw
385+
6., // sh
386+
5., // xsmall font
387+
6., // small font
388+
7., // medium font
389+
9., // large font
390+
11., // xlarge font
391+
5.4, // badge font
392+
]);
393+

src/railway/style.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ const ZOOM: &[Zoom] = &[
4747
Zoom::new(3.5, 3, 1.6, measures::BASE_D3),
4848
Zoom::new(4.0, 4, 1.3, measures::BASE_D4),
4949
Zoom::new(4.5, 4, 1.6, measures::BASE_D4),
50-
Zoom::new(5.0, 5, 1.3, measures::BASE_D4), // 15
51-
Zoom::new(5.5, 5, 1.6, measures::BASE_D4),
52-
Zoom::new(5.5, 5, 1.9, measures::BASE_D4),
53-
Zoom::new(5.5, 5, 2.2, measures::BASE_D4),
54-
Zoom::new(5.5, 5, 2.5, measures::BASE_D4),
50+
Zoom::new(5.0, 5, 1.3, measures::BASE_D5), // 15
51+
Zoom::new(5.5, 5, 1.6, measures::BASE_D5),
52+
Zoom::new(5.5, 5, 1.9, measures::BASE_D5),
53+
Zoom::new(5.5, 5, 2.2, measures::BASE_D5),
54+
Zoom::new(5.5, 5, 2.5, measures::BASE_D5),
5555
];
5656

5757
const PROOF_ZOOM: &[Zoom] = &[
@@ -69,11 +69,11 @@ const PROOF_ZOOM: &[Zoom] = &[
6969
Zoom::new(3.5, 3, 1.3, measures::BASE_D3),
7070
Zoom::new(4.0, 4, 1.0, measures::BASE_D4),
7171
Zoom::new(4.5, 4, 1.3, measures::BASE_D4),
72-
Zoom::new(5.0, 5, 1.0, measures::BASE_D4),
73-
Zoom::new(5.5, 5, 1.3, measures::BASE_D4), // 15
74-
Zoom::new(5.5, 5, 1.6, measures::BASE_D4),
75-
Zoom::new(5.5, 5, 1.9, measures::BASE_D4),
76-
Zoom::new(5.5, 5, 2.1, measures::BASE_D4),
72+
Zoom::new(5.0, 5, 1.0, measures::BASE_D5),
73+
Zoom::new(5.5, 5, 1.3, measures::BASE_D6), // 15
74+
Zoom::new(5.5, 5, 1.6, measures::BASE_D6),
75+
Zoom::new(5.5, 5, 1.9, measures::BASE_D6),
76+
Zoom::new(5.5, 5, 2.1, measures::BASE_D6),
7777
];
7878

7979
/// Size correction for feature bounds.

0 commit comments

Comments
 (0)