Using QWT, I want to plot an image. Each point of the image is set as argb value. For example:
I tried the following:
using PlotData with:
setInterval( Qt::ZAxis, QwtInterval( 0, 0xFFFFFFFF ) );
but I expected to find a Color Map class (like QwtLinearColorMap) that handles rgb values; Should I create it by myself inheriting from QwtColorMap? How? Am I on the wrong path?
My current solution (improvements are welcome):
Implemented Color Map like this:
class RgbColorMap: public QwtColorMap {
virtual QRgb rgb( const QwtInterval &interval, double alpha_rgb ) const {
return alpha_rgb;
}
virtual unsigned char colorIndex( const QwtInterval &interval, double value ) const {
return 0;
}
};
User contributions licensed under CC BY-SA 3.0