// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "HUD.hxx"
+#include "HUD_private.hxx"
static const float TICK_OFFSET = 2.f;
void HUD::Tape::draw_vertical(float value)
{
- float vmin = 0.0, vmax = 0.0;
+ float vmin = 0.0;//, vmax = 0.0;
float marker_xs;
float marker_xe;
float marker_ye;
if (!_pointer) {
vmin = value - _half_width_units; // width units == needle travel
- vmax = value + _half_width_units; // or picture unit span.
+// vmax = value + _half_width_units; // or picture unit span.
text_y = _center_y;
} else if (_pointer_type == MOVING) {
vmin = _input.min();
- vmax = _input.max();
+// vmax = _input.max();
} else { // FIXED
vmin = value - _half_width_units; // width units == needle travel
- vmax = value + _half_width_units; // or picture unit span.
+// vmax = value + _half_width_units; // or picture unit span.
text_y = _center_y;
}
void HUD::Tape::draw_horizontal(float value)
{
- float vmin = 0.0, vmax = 0.0;
+ float vmin = 0.0;//, vmax = 0.0;
float marker_xs;
- float marker_xe;
+// float marker_xe;
float marker_ys;
float marker_ye;
- float text_y = 0.0;
+// float text_y = 0.0;
float top = _y + _h;
float right = _x + _w;
if (!_pointer) {
vmin = value - _half_width_units; // width units == needle travel
- vmax = value + _half_width_units; // or picture unit span.
- text_y = _center_y;
+// vmax = value + _half_width_units; // or picture unit span.
+// text_y = _center_y;
} else if (_pointer_type == MOVING) {
vmin = _input.min();
- vmax = _input.max();
+// vmax = _input.max();
} else { // FIXED
vmin = value - _half_width_units; // width units == needle travel
- vmax = value + _half_width_units; // or picture unit span.
- text_y = _center_y;
+// vmax = value + _half_width_units; // or picture unit span.
+// text_y = _center_y;
}
// left tick bar
marker_ys = _y; // Starting point for
marker_ye = top; // tick y location calcs
- marker_xe = right;
+// marker_xe = right;
marker_xs = _x + ((value - vmin) * factor());
if (option_top()) {
char *HUD::Tape::format_value(float v)
{
- if (fabsf(v) < 1e-8) // avoid -0.0
+ if (fabs(v) < 1e-8) // avoid -0.0
v = 0.0f;
if (_label_fmt == INT)