Qwtrasterdata -
#include <qwt_raster_data.h>
Inherited by QwtPlotSpectrogram::PrivateData::DummyData.
enum ConrecAttribute { IgnoreAllVerticesOnLevel = 1, IgnoreOutOfRange = 2 }
typedef QMap< double, QPolygonF > ContourLines
QwtRasterData ()
QwtRasterData (const QwtDoubleRect &)
virtual ~QwtRasterData ()
QwtDoubleRect boundingRect () const
virtual ContourLines contourLines (const QwtDoubleRect &rect, const QSize &raster, const QList< double > &levels, int flags) const
virtual QwtRasterData * copy () const =0
virtual void discardRaster ()
virtual void initRaster (const QwtDoubleRect &, const QSize &raster)
virtual QwtDoubleInterval range () const =0
virtual QSize rasterHint (const QwtDoubleRect &) const
virtual void setBoundingRect (const QwtDoubleRect &)
virtual double value (double x, double y) const =0
QwtRasterData defines an interface to any type of raster data.
QwtRasterData is an abstract interface, that is used by QwtPlotRasterItem to find the values at the pixels of its raster.
Often a raster item is used to display values from a matrix. Then the derived raster data class needs to implement some sort of resampling, that maps the raster of the matrix into the requested raster of the raster item ( depending on resolution and scales of the canvas ).
Constructor
Parameters:
boundingRect Bounding rectangle
See also:
setBoundingRect()
Returns:
Bounding rectangle
See also:
boundingRect()
Calculate contour lines
An adaption of CONREC, a simple contouring algorithm. http://local.wasp.uwa.edu.au/~pbourke/papers/conrec/
Discard a raster. After the composition of an image QwtPlotSpectrogram calls discardRaster().
The default implementation does nothing, but if data has been loaded in initRaster(), it could deleted now.
See also:
initRaster(), value()
Initialize a raster. Before the composition of an image QwtPlotSpectrogram calls initRaster, announcing the area and its resolution that will be requested.
The default implementation does nothing, but for data sets that are stored in files, it might be good idea to reimplement initRaster, where the data is resampled and loaded into memory.
Parameters:
rect Area of the raster
raster Number of horizontal and vertical pixels
See also:
initRaster(), value()
Returns:
the range of the values
Find the raster of the data for an area. The resolution is the number of horizontal and vertical pixels that the data can return for an area. An invalid resolution indicates that the data can return values for any detail level.
The resolution will limit the size of the image that is rendered from the data. F.e. this might be important when printing a spectrogram to a A0 printer with 600 dpi.
The default implementation returns an invalid resolution (size)
Parameters:
rect In most implementations the resolution of the data doesn't depend on the requested rectangle.
Returns:
Resolution, as number of horizontal and vertical pixels
Set the bounding rect ( == area, un plot coordinates )
Parameters:
boundingRect Bounding rectangle
See also:
boundingRect()
Returns:
the value at a raster position
Parameters:
x X value in plot coordinates
y Y value in plot coordinates
Generated automatically by Doxygen for Qwt User's Guide from the source code.