QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_transform.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
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 *
9 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_TRANSFORM_H
28#define QWT_TRANSFORM_H
29
30#include "qwt_global.h"
31
60class QWT_EXPORT QwtTransform
61{
62public:
66 virtual ~QwtTransform();
67
69 virtual double bounded(double value) const;
71 virtual double transform(double value) const = 0;
73 virtual double invTransform(double value) const = 0;
75 virtual QwtTransform* copy() const = 0;
76
77private:
78 Q_DISABLE_COPY(QwtTransform)
79};
80
91class QWT_EXPORT QwtNullTransform : public QwtTransform
92{
93public:
97 virtual ~QwtNullTransform();
98
100 virtual double transform(double value) const override;
102 virtual double invTransform(double value) const override;
104 virtual QwtTransform* copy() const override;
105};
121class QWT_EXPORT QwtLogTransform : public QwtTransform
122{
123public:
127 virtual ~QwtLogTransform();
128
130 virtual double transform(double value) const override;
132 virtual double invTransform(double value) const override;
134 virtual double bounded(double value) const override;
136 virtual QwtTransform* copy() const override;
137
139 static const double LogMin;
141 static const double LogMax;
142};
143
159class QWT_EXPORT QwtPowerTransform : public QwtTransform
160{
161public:
163 explicit QwtPowerTransform(double exponent);
165 virtual ~QwtPowerTransform();
166
168 virtual double transform(double value) const override;
170 virtual double invTransform(double value) const override;
172 virtual QwtTransform* copy() const override;
173
174private:
175 const double m_exponent;
176};
177
178#endif
对数变换
Definition qwt_transform.h:122
static const double LogMax
Largest allowed value for logarithmic scales: 1.0e150
Definition qwt_transform.h:141
static const double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150
Definition qwt_transform.h:139
空变换
Definition qwt_transform.h:92
使用 pow() 的变换
Definition qwt_transform.h:160
坐标系之间的变换
Definition qwt_transform.h:61
virtual QwtTransform * copy() const =0
Virtualized copy operation
virtual double transform(double value) const =0
Transformation function
virtual double invTransform(double value) const =0
Inverse transformation function