Logo Search packages:      
Sourcecode: pfstools version File versions  Download package

void Histogram::drawScale (  )  [private]

Draws scale

Definition at line 135 of file histogram.cpp.

References lum2pos().

Referenced by redraw().

                          {

      glColor3f(0.1f, 0.1f, 0.1f);
      
      float pos;
      int offsetX = SIDE_BAR; 
      int offsetY = height / 4;//yPos - height;
      int k1 = 0;
      for( int i = (int)logLumMin; i <= (int)logLumMax; i++) {
      
            pos = lum2pos( pow(10, (float)i)) * (float)width;

            glRectf( offsetX + pos, offsetY, offsetX + pos + 1, offsetY + height/2);
            
            if( i < 0) {
                  glRasterPos2f( offsetX + pos - 5, offsetY - 10);
                  glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, '-');
                  glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, '6' - (k1++));
            }
            else {
                  glRasterPos2f( offsetX + pos - 2, offsetY - 10);
                  glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, '0' + i);
            }     

      } 
      glRectf( offsetX, offsetY, offsetX+pos + 1, offsetY-1); 
}


Generated by  Doxygen 1.6.0   Back to index