1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_MATRIX_RASTER_DATA_H
11
#define QWT_MATRIX_RASTER_DATA_H 1
13
#include "qwt_global.h"
14
#include "qwt_raster_data.h"
18
\brief A class representing a matrix of values as raster data
20
QwtMatrixRasterData implements an interface for a matrix of
21
equidistant values, that can be used by a QwtPlotRasterItem.
22
It implements a couple of resampling algorithms, to provide
23
values for positions, that or not on the value matrix.
25
class QWT_EXPORT QwtMatrixRasterData: public QwtRasterData
29
\brief Resampling algorithm
30
The default setting is NearestNeighbour;
35
Return the value from the matrix, that is nearest to the
36
the requested position.
41
Interpolate the value from the distances and values of the
42
4 surrounding values in the matrix,
47
QwtMatrixRasterData();
48
virtual ~QwtMatrixRasterData();
50
void setResampleMode(ResampleMode mode);
51
ResampleMode resampleMode() const;
53
virtual void setInterval( Qt::Axis, const QwtInterval & );
54
void setValueMatrix( const QVector<double> &values, size_t numColumns );
56
const QVector<double> valueMatrix() const;
57
size_t numColumns() const;
58
size_t numRows() const;
60
virtual QRectF pixelHint( const QRectF & ) const;
62
virtual double value( double x, double y ) const;