Hi all,
I am using QwtPlotSpectrogram to display two raster 'maps' (great library btw).
The bottom layer spectrogram is a gray scale shaded relief map of a landscape and the top map is information from a water balance calculation in a blue colors from light blue to darkblue using QwtLinearColorMap. I would like the value 0 of the top layer spectrogram to be totally transparent (alpha = 0) and the blue values to be partially transparent (for instance alpha = 200). This top layer changes every few seconds because a model in a different thread does water balance calculations so the information is renewed every model run and the spectrograms are redrawn:
- fill a vector with relief data,
- attach the gray scale colormap
- replot and rescale the QwtPlot
- fill a vector with 'water data'
- attach a blue palette colormap
- replot and rescale the QwtPlot
- next model run
I hope I can make myself clear! I can attach code but its rather a lot. Basically I follow the spectrogram example.
I have tried setting the alpha value in QwtLinearColorMap but that has no effect and I have tried setAlpha(int) of the QwtPlotSpectrogram but that makes the spectrogram more grayish but not transparent (and is anyway not what I want).
There is also QwtAlphaColorMap but I don't understand how to link that to the spectrogram or the colormap.
thanks for any help
Victor
Bookmarks