Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
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
10#ifndef QWT_POINT_MAPPER_H
11#define QWT_POINT_MAPPER_H
12
13#include "qwt_global.h"
14
15class QwtScaleMap;
16template< typename T > class QwtSeriesData;
17class QPolygonF;
18class QPointF;
19class QRectF;
20class QPolygon;
21class QPen;
22class QImage;
23
32class QWT_EXPORT QwtPointMapper
33{
34 public:
40 {
42 RoundPoints = 0x01,
43
48 WeedOutPoints = 0x02,
49
68 WeedOutIntermediatePoints = 0x04
69 };
70
72
75
76 void setFlags( TransformationFlags );
77 TransformationFlags flags() const;
78
79 void setFlag( TransformationFlag, bool on = true );
80 bool testFlag( TransformationFlag ) const;
81
82 void setBoundingRect( const QRectF& );
83 QRectF boundingRect() const;
84
85 QPolygonF toPolygonF( const QwtScaleMap& xMap, const QwtScaleMap& yMap,
86 const QwtSeriesData< QPointF >* series, int from, int to ) const;
87
88 QPolygon toPolygon( const QwtScaleMap& xMap, const QwtScaleMap& yMap,
89 const QwtSeriesData< QPointF >* series, int from, int to ) const;
90
91 QPolygon toPoints( const QwtScaleMap& xMap, const QwtScaleMap& yMap,
92 const QwtSeriesData< QPointF >* series, int from, int to ) const;
93
94 QPolygonF toPointsF( const QwtScaleMap& xMap, const QwtScaleMap& yMap,
95 const QwtSeriesData< QPointF >* series, int from, int to ) const;
96
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;
100
101 private:
102 Q_DISABLE_COPY(QwtPointMapper)
103
104 class PrivateData;
105 PrivateData* m_data;
106};
107
108Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPointMapper::TransformationFlags )
109
110#endif
A helper class for translating a series of points.
TransformationFlag
Flags affecting the transformation process.
QFlags< TransformationFlag > TransformationFlags
A scale map.
Abstract interface for iterating over samples.