ShadesTools.hh 577 Bytes
/*
 * ShadesTools.hh
 *
 *  Created on: Jul 8, 2014
 *      Author: AKKA
 */

#include "plplot/plplotP.h"

#include "Axis.hh"

#ifndef SHADESTOOLS_HH_
#define SHADESTOOLS_HH_

namespace plot {

/**
 * Some tools used to draw shades (spectro & matrix)
 */
class ShadesTools {
public:
	ShadesTools(){}

	static void computeEdgesLevels(Range r, int shadeLevels, PLFLT *shedge)
	{
		for (int i = 0; i < shadeLevels; ++i)
		{
			shedge[i] = r.getMin() + ( r.getMax() - r.getMin() ) * (PLFLT) i / (PLFLT)(shadeLevels-1);
		}
	}
};

}/* namespace plot */
#endif /* SHADESTOOLS_HH_ */