QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_point_mapper.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_POINT_MAPPER_H
28#define QWT_POINT_MAPPER_H
29
30#include "qwt_global.h"
31
32class QwtScaleMap;
33template< typename T >
34class QwtSeriesData;
35class QPolygonF;
36class QPointF;
37class QRectF;
38class QPolygon;
39class QPen;
40class QImage;
41
60class QWT_EXPORT QwtPointMapper
61{
62public:
75 {
77 RoundPoints = 0x01,
78
80 WeedOutPoints = 0x02,
81
113 WeedOutIntermediatePoints = 0x04
114 };
115
116 Q_DECLARE_FLAGS(TransformationFlags, TransformationFlag)
117
118 // Constructor
120 // Destructor
122
123 // Set the transformation flags
124 void setFlags(TransformationFlags);
125 // Get the transformation flags
126 TransformationFlags flags() const;
127
128 // Set or clear a transformation flag
129 void setFlag(TransformationFlag, bool on = true);
130 // Test if a transformation flag is set
131 bool testFlag(TransformationFlag) const;
132
133 // Set the bounding rectangle for mapping
134 void setBoundingRect(const QRectF&);
135 // Get the bounding rectangle
136 QRectF boundingRect() const;
137
138 // Translate a series of points into a QPolygonF
139 QPolygonF
140 toPolygonF(const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QwtSeriesData< QPointF >* series, int from, int to) const;
141
142 // Translate a series of points into a QPolygon
143 QPolygon
144 toPolygon(const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QwtSeriesData< QPointF >* series, int from, int to) const;
145
146 // Translate a series of points into a QPolygon (scattered points)
147 QPolygon
148 toPoints(const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QwtSeriesData< QPointF >* series, int from, int to) const;
149
150 // Translate a series of points into a QPolygonF (scattered points)
151 QPolygonF
152 toPointsF(const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QwtSeriesData< QPointF >* series, int from, int to) const;
153
154 // Translate a series into a QImage
155 QImage toImage(const QwtScaleMap& xMap,
156 const QwtScaleMap& yMap,
157 const QwtSeriesData< QPointF >* series,
158 int from,
159 int to,
160 const QPen&,
161 bool antialiased,
162 uint numThreads) const;
163
164private:
165 Q_DISABLE_COPY(QwtPointMapper)
166
167 class PrivateData;
168 PrivateData* m_data;
169};
170
171Q_DECLARE_OPERATORS_FOR_FLAGS(QwtPointMapper::TransformationFlags)
172
173#endif
用于转换点序列的辅助类
Definition qwt_point_mapper.h:61
TransformationFlag
影响转换过程的标志
Definition qwt_point_mapper.h:75
刻度映射
Definition qwt_scale_map.h:52
遍历样本的抽象接口
Definition qwt_series_data.h:72