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 = FloatToInt(Maximum_value - Minimum_value) / 100;
49 if (range_shown < temp)
54 instr_scale::instr_scale( const instr_scale & image ) :
55 instr_item( (const instr_item &) image),
56 range_shown ( image.range_shown ),
57 Maximum_value( image.Maximum_value ),
58 Minimum_value( image.Minimum_value ),
59 scale_factor ( image.scale_factor ),
60 Maj_div ( image.Maj_div ),
61 Min_div ( image.Min_div ),
62 Modulo ( image.Modulo ),
63 signif_digits( image.signif_digits )
68 instr_scale::~instr_scale ()