QGIS API Documentation  3.8.0-Zanzibar (11aff65)
qgsrasterresampler.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterresampler.h
3  --------------------
4  begin : December 2011
5  copyright : (C) 2011 by Marco Hugentobler
6  email : marco at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSRASTERRESAMPLER_H
19 #define QGSRASTERRESAMPLER_H
20 
21 #include <QString>
22 #include "qgis_core.h"
23 #include "qgis_sip.h"
24 
25 class QString;
26 class QImage;
27 
32 class CORE_EXPORT QgsRasterResampler
33 {
34 #ifdef SIP_RUN
37 #endif
38 
39 
40 #ifdef SIP_RUN
42  if ( dynamic_cast<QgsBilinearRasterResampler *>( sipCpp ) != NULL )
43  sipType = sipType_QgsBilinearRasterResampler;
44  else if ( dynamic_cast<QgsCubicRasterResampler *>( sipCpp ) != NULL )
45  sipType = sipType_QgsCubicRasterResampler;
46  else
47  sipType = 0;
48  SIP_END
49 #endif
50 
51  public:
52  virtual ~QgsRasterResampler() = default;
53  virtual void resample( const QImage &srcImage, QImage &dstImage ) = 0;
54 
59  virtual QString type() const = 0;
60 
66  virtual QgsRasterResampler *clone() const = 0 SIP_FACTORY;
67 };
68 
69 #endif // QGSRASTERRESAMPLER_H
Interface for resampling rasters (e.g.
#define SIP_END
Definition: qgis_sip.h:182
#define SIP_FACTORY
Definition: qgis_sip.h:69
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:165