diff --git a/src/cluster.c b/src/cluster.c index 80f3ad0..93d4679 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -30,13 +30,13 @@ void hexagram_cluster_resize(hexagram_cluster *cluster, width * 0.43, height * 0.76, height * 0.13, - 240.0); + 230.0); hexagram_fuel_init(&cluster->fuel, width * 0.57, height * 0.76, height * 0.13, - 0.125); + 0.14); hexagram_mfd_init(&cluster->mfd, width * 0.42, diff --git a/src/fuel.c b/src/fuel.c index 248f503..412f7e0 100644 --- a/src/fuel.c +++ b/src/fuel.c @@ -52,6 +52,10 @@ void hexagram_fuel_draw_face(hexagram_fuel *fuel, * Draw gauge graduations */ for (i=0; i<=16; i++) { + double min_radius = (i <= 4)? + (i % 2? 0.8: 0.7): + (i % 4? 0.8: 0.7); + if (i <= (16.0 * fuel->redline)) { cairo_set_source_rgb(cr, 1, 0, 0); } else { @@ -60,7 +64,7 @@ void hexagram_fuel_draw_face(hexagram_fuel *fuel, hexagram_gauge_draw_mark(&fuel->gauge, cr, - (i % 4)? 0.8: 0.7, + min_radius, 0.9, (double)i / 16.0); } @@ -80,5 +84,5 @@ void hexagram_fuel_draw_needle(hexagram_fuel *fuel, hexagram_gauge_draw_needle(&fuel->gauge, cr, 0.9, - level / 1.0); + level); } diff --git a/src/thermo.c b/src/thermo.c index deef70b..f913743 100644 --- a/src/thermo.c +++ b/src/thermo.c @@ -60,16 +60,20 @@ void hexagram_thermo_draw_face(hexagram_thermo *thermo, /* * Draw gauge graduations */ - for (i=0; i<=140; i+=7) { - if (i + 120 >= thermo->redline) { + for (i=0; i<=16; i++) { + double min_radius = (i >= 14)? + (i % 2? 0.8: 0.7): + (i % 4? 0.8: 0.7); + + if ((i * 8.23529411) + 120 >= thermo->redline) { cairo_set_source_rgb(cr, 1, 0, 0); } hexagram_gauge_draw_mark(&thermo->gauge, cr, - (i % 35)? 0.8: 0.7, + min_radius, 0.90, - i / 140.0); + i / 16.0); } }