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 guage_instr classes.
16 //============================================================================
33 instr_item( x, y, width, height,
34 load_fn, disp_scale, options, working),
35 range_shown ( show_range ),
36 Maximum_value( maxValue ),
37 Minimum_value( minValue ),
38 Maj_div ( major_divs ),
39 Min_div ( minor_divs ),
41 signif_digits( dp_showing )
45 scale_factor = (float)get_span() / range_shown;
46 if( show_range < 0 ) {
47 range_shown = -range_shown;
49 temp = FloatToInt(Maximum_value - Minimum_value) / 100;
50 if( range_shown < temp ) {
56 instr_scale( const instr_scale & image ) :
57 instr_item( (const instr_item &) image),
58 range_shown ( image.range_shown ),
59 Maximum_value( image.Maximum_value ),
60 Minimum_value( image.Minimum_value ),
61 scale_factor ( image.scale_factor ),
62 Maj_div ( image.Maj_div ),
63 Min_div ( image.Min_div ),
64 Modulo ( image.Modulo ),
65 signif_digits( image.signif_digits )
69 instr_scale & instr_scale :: operator = (const instr_scale & rhs )
71 if( !(this == &rhs)) {
72 instr_item::operator = (rhs);
73 range_shown = rhs.range_shown;
74 scale_factor = rhs.scale_factor;
75 Maximum_value = rhs.Maximum_value;
76 Minimum_value = rhs.Minimum_value;
77 Maj_div = rhs.Maj_div;
78 Min_div = rhs.Min_div;
80 signif_digits = rhs.signif_digits;
85 instr_scale :: ~ instr_scale () {}