- if( huds_both(options) )
- {
- if(tick_length=="variable")
- {
- drawOneLine( marker_xs, scrn_rect.top,
- marker_xs, marker_ys - 4);
- drawOneLine( marker_xs, marker_ye + 4,
- marker_xs, height);
- }
- else
- {
- drawOneLine( marker_xs, scrn_rect.top,
- marker_xs, marker_ys);
- drawOneLine( marker_xs, marker_ye,
- marker_xs, height);
- }
- // glBegin(GL_LINES);
- // glVertex2f( marker_xs, scrn_rect.top);
- // glVertex2f( marker_xs, marker_ys - 4);
- // glVertex2f( marker_xs, marker_ye + 4);
- // glVertex2f( marker_xs, scrn_rect.top + scrn_rect.bottom);
- // glEnd();
- } else {
- if( huds_top(options))
- { //draw minor ticks
- if(tick_length=="variable")
- drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye-4);
- else
- drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye);
- } else
- if(tick_length=="variable")
- drawOneLine(marker_xs,marker_ys+4,marker_xs,marker_ye);
- else
- drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye);
- }
- } //end draw minor ticks
- } //end minor ticks
- //major ticks
- if( div_max()) {
- // printf("i = %d\n", i);
- // if( (i%(int)div_max())==0 ) {
- //draw major ticks
- if( !(k%(int)div_max()) ) {
- if(modulo()) {
- disp_val = i % (int) modulo(); // ?????????
- if( disp_val < 0) {
- while(disp_val<0)
- disp_val += modulo();
- }
- } else {
- disp_val = i;
- }
- // printf("disp_val = %d\n", disp_val);
- // printf("%d\n", (int)(disp_val * (double)data_scaling() + 0.5));
- lenstr = sprintf( TextScale, "%d",
- // (int)(disp_val * data_scaling() +.5));
- FloatToInt(disp_val * data_scaling()/*+.5*/));
- // Draw major ticks and text only if far enough from the edge.
- /*if(( (marker_xs - 10)> scrn_rect.left ) &&
- ( (marker_xs + 10) < (scrn_rect.left + scrn_rect.right))){*/ //suma
- if( huds_both(options) ) {
- // drawOneLine( marker_xs, scrn_rect.top,
- // marker_xs, marker_ys);
- // drawOneLine( marker_xs, marker_ye,
- // marker_xs, scrn_rect.top + scrn_rect.bottom);
- glBegin(GL_LINE_STRIP);
- glVertex2f( marker_xs, scrn_rect.top);
- glVertex2f( marker_xs, marker_ye);
- glVertex2f( marker_xs, height);
- glEnd();
- if( !huds_notext(options) ) {
- textString ( marker_xs - 4 * lenstr,
- marker_ys + 4,
- TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma
- }
- } else {
- drawOneLine( marker_xs, marker_ys,
- marker_xs, marker_ye );
- if( !huds_notext(options)) {
- if( huds_top(options) ) {
- textString ( marker_xs - 4 * lenstr,
- height - 10,
- TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma
- } else {
- textString( marker_xs - 4 * lenstr,
- scrn_rect.top,
- TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma
- }
- }
- }
- } //end draw major ticks
- } //endif major ticks
- } //end condition
- } //end for
- } //end zoom
- } //end horizontal/vertical scale
- } // end of type tape
+ if( huds_both(options) ) {
+ if(tick_length=="variable") {
+ drawOneLine( marker_xs, scrn_rect.top,
+ marker_xs, marker_ys - 4);
+ drawOneLine( marker_xs, marker_ye + 4,
+ marker_xs, height);
+ } else {
+ drawOneLine( marker_xs, scrn_rect.top,
+ marker_xs, marker_ys);
+ drawOneLine( marker_xs, marker_ye,
+ marker_xs, height);
+ }
+ // glBegin(GL_LINES);
+ // glVertex2f( marker_xs, scrn_rect.top);
+ // glVertex2f( marker_xs, marker_ys - 4);
+ // glVertex2f( marker_xs, marker_ye + 4);
+ // glVertex2f( marker_xs, scrn_rect.top + scrn_rect.bottom);
+ // glEnd();
+ } else {
+ if( huds_top(options)) {
+ //draw minor ticks
+ if(tick_length=="variable")
+ drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye-4);
+ else
+ drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye);
+ } else
+ if(tick_length=="variable")
+ drawOneLine(marker_xs,marker_ys+4,marker_xs,marker_ye);
+ else
+ drawOneLine(marker_xs,marker_ys,marker_xs,marker_ye);
+ }
+ } //end draw minor ticks
+ } //end minor ticks
+ //major ticks
+ if( div_max()) {
+ // printf("i = %d\n", i);
+ // if( (i%(int)div_max())==0 ) {
+ //draw major ticks
+ if( !(k%(int)div_max()) ) {
+ if(modulo()) {
+ disp_val = i % (int) modulo(); // ?????????
+ if( disp_val < 0) {
+ while(disp_val<0)
+ disp_val += modulo();
+ }
+ } else {
+ disp_val = i;
+ }
+ // printf("disp_val = %d\n", disp_val);
+ // printf("%d\n", (int)(disp_val * (double)data_scaling() + 0.5));
+ lenstr = sprintf( TextScale, "%d",
+ // (int)(disp_val * data_scaling() +.5));
+ FloatToInt(disp_val * data_scaling()/*+.5*/));
+ // Draw major ticks and text only if far enough from the edge.
+ /*if(( (marker_xs - 10)> scrn_rect.left ) &&
+ ( (marker_xs + 10) < (scrn_rect.left + scrn_rect.right))){*/ //suma
+ if( huds_both(options) ) {
+ // drawOneLine( marker_xs, scrn_rect.top,
+ // marker_xs, marker_ys);
+ // drawOneLine( marker_xs, marker_ye,
+ // marker_xs, scrn_rect.top + scrn_rect.bottom);
+ glBegin(GL_LINE_STRIP);
+ glVertex2f( marker_xs, scrn_rect.top);
+ glVertex2f( marker_xs, marker_ye);
+ glVertex2f( marker_xs, height);
+ glEnd();
+ if( !huds_notext(options) ) {
+ textString ( marker_xs - 4 * lenstr,
+ marker_ys + 4,
+ TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma
+ }
+ } else {
+ drawOneLine( marker_xs, marker_ys,
+ marker_xs, marker_ye );
+ if( !huds_notext(options)) {
+ if( huds_top(options) ) {
+ textString ( marker_xs - 4 * lenstr,
+ height - 10,
+ TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma
+ } else {
+ textString( marker_xs - 4 * lenstr,
+ scrn_rect.top,
+ TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma
+ }
+ }
+ }
+ } //end draw major ticks
+ } //endif major ticks
+ } //end condition
+ } //end for
+ } //end zoom
+ } //end horizontal/vertical scale
+ } // end of type tape