From 365546444cee73c3025318c9dfe9edd648485b3f Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 12 Jun 2006 22:27:10 +0000 Subject: [PATCH] fix ugly aliasing effects in moving scales (caused by integer calculation of tick coords) --- src/Cockpit/hud_card.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Cockpit/hud_card.cxx b/src/Cockpit/hud_card.cxx index f678a94ce..b958b2cc0 100644 --- a/src/Cockpit/hud_card.cxx +++ b/src/Cockpit/hud_card.cxx @@ -166,10 +166,10 @@ draw( void ) // (HUD_scale * pscale ) { float vmin = 0.0, vmax = 0.0; - int marker_xs; - int marker_xe; - int marker_ys; - int marker_ye; + float marker_xs; + float marker_xe; + float marker_ys; + float marker_ye; int text_x = 0, text_y = 0; int lenstr; int height, width; @@ -452,7 +452,7 @@ draw( void ) // (HUD_scale * pscale ) if( condition ) { // Show a tick if necessary // Calculate the location of this tick - marker_ys = scrn_rect.top + FloatToInt(((i - vmin) * factor()/*+.5f*/)); + marker_ys = scrn_rect.top + (i - vmin) * factor()/*+.5f*/; // marker_ys = scrn_rect.top + (int)((i - vmin) * factor() + .5); // Block calculation artifact from drawing ticks below min coordinate. // Calculation here accounts for text height.