Skip to content

Commit 8c3cbd9

Browse files
committed
Switch D0 and D1 track style to that of D2.
1 parent f35a8df commit 8c3cbd9

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

src/railway/class.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ impl Gauge {
810810
("g600", 600),
811811
("g750", 750),
812812
("g760", 760),
813+
("g762", 762),
813814
("g785", 785),
814815
("g800", 800),
815816
("g802", 802),

src/railway/feature/track.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,15 @@ impl Feature for TrackContour {
295295
fn shape(
296296
&self, style: &Style, _canvas: &Canvas
297297
) -> AnyShape {
298+
/*
298299
if style.detail() <= 1 {
299300
AnyShape::from(
300301
ContourShape::new(&self.class, self.trace.outline(style))
301302
)
302303
}
303-
else if style.detail() == 2 {
304+
else
305+
*/
306+
if style.detail() <= 2 {
304307
return AnyShape::from(ContourShape2::new(self, style));
305308
}
306309
else if style.detail() == 3 {
@@ -313,6 +316,7 @@ impl Feature for TrackContour {
313316
}
314317

315318

319+
/*
316320
//------------ ContourShape --------------------------------------------------
317321
318322
struct ContourShape<'a> {
@@ -372,6 +376,7 @@ impl<'a> ContourShape<'a> {
372376
);
373377
}
374378
}
379+
*/
375380

376381

377382
//------------ ContourShape2 -------------------------------------------------

src/railway/measures.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ impl ops::MulAssign<f64> for Measures {
259259
/// The standard measures for detail level 0.
260260
pub const BASE_D0: Measures = Measures([
261261
2.0, // dt
262-
0.8, // main track
263-
0.85, // main double
264-
0.3, // main skip
262+
1.1, // main track
263+
1.6, // main double
264+
0.4, // main skip
265265
0.6, // light track
266-
0.65, // light double
267-
0.2, // light skip
266+
1.2, // light double
267+
0.3, // light skip
268268
0.3, // guide width
269269
0.4, // border width
270270
12., // seg = 6dt

src/railway/style.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ const ZOOM: &[Zoom] = &[
4949
Zoom::new(4.5, 4, 1.6, measures::BASE_D4),
5050
Zoom::new(5.0, 5, 1.3, measures::BASE_D5), // 15
5151
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),
52+
Zoom::new(6.0, 6, 1.9, measures::BASE_D6),
53+
Zoom::new(6.5, 6, 2.2, measures::BASE_D6),
54+
Zoom::new(6.5, 6, 2.5, measures::BASE_D6),
5555
];
5656

5757
const PROOF_ZOOM: &[Zoom] = &[
@@ -70,10 +70,10 @@ const PROOF_ZOOM: &[Zoom] = &[
7070
Zoom::new(4.0, 4, 1.0, measures::BASE_D4),
7171
Zoom::new(4.5, 4, 1.3, measures::BASE_D4),
7272
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),
73+
Zoom::new(5.5, 5, 1.3, measures::BASE_D5), // 15
74+
Zoom::new(6.0, 6, 1.6, measures::BASE_D6),
75+
Zoom::new(6.5, 6, 1.9, measures::BASE_D6),
76+
Zoom::new(6.5, 6, 2.1, measures::BASE_D6),
7777
];
7878

7979
/// Size correction for feature bounds.

0 commit comments

Comments
 (0)