5 //============== Top of instr_scale class memeber definitions ===============
8 // 1. instr_scales divide the specified location into half and then
9 // the half opposite the read direction in half again. A bar is
10 // then drawn along the second divider. Scale ticks are drawn
11 // between the middle and quarter section lines (minor division
12 // markers) or just over the middle line.
14 // 2. This class was not intended to be instanciated. See moving_scale
15 // and gauge_instr classes.
16 //============================================================================
17 instr_scale::instr_scale(
33 instr_item( x, y, width, height, load_fn, disp_scale, options, working),
34 range_shown ( show_range ),
35 Maximum_value( maxValue ),
36 Minimum_value( minValue ),
37 Maj_div ( major_divs ),
38 Min_div ( minor_divs ),
40 signif_digits( dp_showing )
44 scale_factor = (float)get_span() / range_shown;
46 range_shown = -range_shown;
48 temp = float_to_int(Maximum_value - Minimum_value) / 100;
49 if (range_shown < temp)