QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_grid_raster_data.h
1#ifndef QWT_GRID_RASTER_DATA_H
2#define QWT_GRID_RASTER_DATA_H
3#include "qwtcore_global.h"
4#include "qwt_raster_data.h"
5#if QT_VERSION < 0x060000
6template< typename T >
7class QVector;
8#endif
9
15class QWTCORE_EXPORT QwtGridRasterData : public QwtRasterData
16{
17public:
24 {
30
36
41 BicubicInterpolation
42 };
43
44public:
45 // Constructor
47 // Destructor
48 ~QwtGridRasterData() override;
49
50 // Set the resampling algorithm
51 void setResampleMode(ResampleMode mode);
52 // Return the resampling algorithm
53 ResampleMode resampleMode() const;
54
55 // Return bounding interval for an axis
56 virtual QwtInterval interval(Qt::Axis axis) const override final;
57
58 // Set new x-axis, y-axis, and data matrix
59 void setValue(const QVector< double >& x, const QVector< double >& y, const QVector< QVector< double > >& v);
60 // Return the value at a raster position
61 virtual double value(double x, double y) const override;
62
63 // Calculate the pixel hint
64 virtual QRectF pixelHint(const QRectF&) const override;
65
66 // Return the size of x-axis
67 int xSize() const;
68 // Return the size of y-axis
69 int ySize() const;
70 // Return the size of the value matrix
71 std::pair< int, int > valueSize() const;
72
73 // Return the value at specified position in the value matrix
74 double atValue(int xIndex, int yIndex) const;
75
76 // Return the x-axis value at specified index
77 double atX(int xIndex) const;
78 // Return the y-axis value at specified index
79 double atY(int yIndex) const;
80
81private:
82 QWT_DECLARE_PRIVATE(QwtGridRasterData)
83};
84
85#endif // QWTGRIDRASTERDATA_H
Definition qwt_clipper.h:41
A class that encapsulates grid data and provides interpolation methods.
Definition qwt_grid_raster_data.h:16
ResampleMode
Resampling algorithm
Definition qwt_grid_raster_data.h:24
@ BilinearInterpolation
Definition qwt_grid_raster_data.h:35
@ NearestNeighbour
Definition qwt_grid_raster_data.h:29
A class representing an interval
Definition qwt_interval.h:39
QwtRasterData defines an interface to any type of raster data.
Definition qwt_raster_data.h:63
virtual QRectF pixelHint(const QRectF &) const
Return a hint for the raster item, about how to align the pixels
Definition qwt_raster_data.cpp:283