Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_point_mapper.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_point_mapper.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_point_mapper.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 12 12 13 13 #include "qwt_global.h" 14 #include "qwt_series_data.h"15 #include <qimage.h>16 14 17 15 class QwtScaleMap; 16 template< typename T > class QwtSeriesData; 18 17 class QPolygonF; 18 class QPointF; 19 class QRectF; 19 20 class QPolygon; 21 class QPen; 22 class QImage; 20 23 21 24 /*! 22 \brief A helper class for translating a series of points 25 \brief A helper class for translating a series of points 23 26 24 QwtPointMapper is a collection of methods and optimizations 25 for translating a series of points into paint device coordinates. 26 It is used by QwtPlotCurve but might also be useful for 27 similar plot items displaying a QwtSeriesData<QPointF>. 27 QwtPointMapper is a collection of methods and optimizations 28 for translating a series of points into paint device coordinates. 29 It is used by QwtPlotCurve but might also be useful for 30 similar plot items displaying a QwtSeriesData<QPointF>. 28 31 */ 29 32 class QWT_EXPORT QwtPointMapper 30 33 { 31 public: 34 public: 32 35 /*! 33 \brief Flags affecting the transformation process 34 \sa setFlag(), setFlags() 36 \brief Flags affecting the transformation process 37 \sa setFlag(), setFlags() 35 38 */ 36 39 enum TransformationFlag … … 40 43 41 44 /*! 42 Try to remove points, that are translated to the 43 same position. 45 Try to remove points, that are translated to the 46 same position. 44 47 */ 45 WeedOutPoints = 0x02 48 WeedOutPoints = 0x02, 49 50 /*! 51 An even more aggressive weeding algorithm, that 52 can be used in toPolygon(). 53 54 A consecutive chunk of points being mapped to the 55 same x coordinate is reduced to 4 points: 56 57 - first point 58 - point with the minimum y coordinate 59 - point with the maximum y coordinate 60 - last point 61 62 In the worst case ( first and last points are never one of the extremes ) 63 the number of points will be 4 times the width. 64 65 As the algorithm is fast it can be used inside of 66 a polyline render cycle. 67 */ 68 WeedOutIntermediatePoints = 0x04 46 69 }; 47 70 48 /*! 49 \brief Flags affecting the transformation process 50 \sa setFlag(), setFlags() 51 */ 52 typedef QFlags<TransformationFlag> TransformationFlags; 71 Q_DECLARE_FLAGS( TransformationFlags, TransformationFlag ) 53 72 54 73 QwtPointMapper(); … … 61 80 bool testFlag( TransformationFlag ) const; 62 81 63 void setBoundingRect( const QRectF & );82 void setBoundingRect( const QRectF& ); 64 83 QRectF boundingRect() const; 65 84 66 QPolygonF toPolygonF( const QwtScaleMap &xMap, const QwtScaleMap&yMap,67 const QwtSeriesData<QPointF > *series, int from, int to ) const;85 QPolygonF toPolygonF( const QwtScaleMap& xMap, const QwtScaleMap& yMap, 86 const QwtSeriesData< QPointF >* series, int from, int to ) const; 68 87 69 QPolygon toPolygon( const QwtScaleMap &xMap, const QwtScaleMap&yMap,70 const QwtSeriesData<QPointF > *series, int from, int to ) const;88 QPolygon toPolygon( const QwtScaleMap& xMap, const QwtScaleMap& yMap, 89 const QwtSeriesData< QPointF >* series, int from, int to ) const; 71 90 72 QPolygon toPoints( const QwtScaleMap &xMap, const QwtScaleMap&yMap,73 const QwtSeriesData<QPointF > *series, int from, int to ) const;91 QPolygon toPoints( const QwtScaleMap& xMap, const QwtScaleMap& yMap, 92 const QwtSeriesData< QPointF >* series, int from, int to ) const; 74 93 75 QPolygonF toPointsF( const QwtScaleMap &xMap, const QwtScaleMap&yMap,76 const QwtSeriesData<QPointF > *series, int from, int to ) const;94 QPolygonF toPointsF( const QwtScaleMap& xMap, const QwtScaleMap& yMap, 95 const QwtSeriesData< QPointF >* series, int from, int to ) const; 77 96 78 QImage toImage( const QwtScaleMap &xMap, const QwtScaleMap&yMap,79 const QwtSeriesData<QPointF > *series, int from, int to,80 const QPen &, bool antialiased, uint numThreads ) const;97 QImage toImage( const QwtScaleMap& xMap, const QwtScaleMap& yMap, 98 const QwtSeriesData< QPointF >* series, int from, int to, 99 const QPen&, bool antialiased, uint numThreads ) const; 81 100 82 private: 101 private: 102 Q_DISABLE_COPY(QwtPointMapper) 103 83 104 class PrivateData; 84 PrivateData *d_data;105 PrivateData* m_data; 85 106 }; 86 107
Note:
See TracChangeset
for help on using the changeset viewer.
