qwt_point_mapper.h
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_POINT_MAPPER_H
00011 #define QWT_POINT_MAPPER_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_series_data.h"
00015 #include <qimage.h>
00016 
00017 class QwtScaleMap;
00018 class QPolygonF;
00019 class QPolygon;
00020 
00029 class QWT_EXPORT QwtPointMapper
00030 {
00031 public:
00036     enum TransformationFlag
00037     {
00039         RoundPoints = 0x01,
00040 
00045         WeedOutPoints = 0x02,
00046 
00065         WeedOutIntermediatePoints = 0x04
00066     };
00067 
00072     typedef QFlags<TransformationFlag> TransformationFlags;
00073 
00074     QwtPointMapper();
00075     ~QwtPointMapper();
00076 
00077     void setFlags( TransformationFlags );
00078     TransformationFlags flags() const;
00079 
00080     void setFlag( TransformationFlag, bool on = true );
00081     bool testFlag( TransformationFlag ) const;
00082 
00083     void setBoundingRect( const QRectF & );
00084     QRectF boundingRect() const;
00085 
00086     QPolygonF toPolygonF( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00087         const QwtSeriesData<QPointF> *series, int from, int to ) const;
00088 
00089     QPolygon toPolygon( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00090         const QwtSeriesData<QPointF> *series, int from, int to ) const;
00091 
00092     QPolygon toPoints( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00093         const QwtSeriesData<QPointF> *series, int from, int to ) const;
00094 
00095     QPolygonF toPointsF( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00096         const QwtSeriesData<QPointF> *series, int from, int to ) const;
00097 
00098     QImage toImage( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00099         const QwtSeriesData<QPointF> *series, int from, int to, 
00100         const QPen &, bool antialiased, uint numThreads ) const;
00101 
00102 private:
00103     Q_DISABLE_COPY(QwtPointMapper)
00104 
00105     class PrivateData;
00106     PrivateData *d_data;
00107 };
00108 
00109 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPointMapper::TransformationFlags )
00110 
00111 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:05