#include "HistogramWin.h" #include #include #include "jed.h" #include HistogramWin::HistogramWin() { // Nothing connected by default dataImage.pixels=NULL; // Default selection xselection=yselection=selectionsize=0; // Default window size glutSetWindow(glWindowNum); glutReshapeWindow(200,200); // Default sample the whole image maxPointsToSample=1000000; // Default Title strcpy(title,"Histogram"); } HistogramWin::~HistogramWin() { } void renderString (int x, int y, char *str) { // We do bad things to the raster position // We should use glGet to get the old value in order to // properly reset it. int len=strlen(str); // position set glRasterPos2f(x,y); // Loop over each character for (int i=0;i