mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
42 lines
768 B
C
42 lines
768 B
C
|
#ifndef QGSIMAGEWARPER_H
|
||
|
#define QGSIMAGEWARPER_H
|
||
|
|
||
|
#include <gdalwarper.h>
|
||
|
#include <qstring.h>
|
||
|
|
||
|
|
||
|
class QgsImageWarper {
|
||
|
public:
|
||
|
|
||
|
enum ResamplingMethod {
|
||
|
NearestNeighbour = GRA_NearestNeighbour,
|
||
|
Bilinear = GRA_Bilinear,
|
||
|
Cubic = GRA_Cubic
|
||
|
};
|
||
|
|
||
|
|
||
|
QgsImageWarper(double angle) : mAngle(angle) { }
|
||
|
|
||
|
void warp(const QString& input, const QString& output,
|
||
|
double& xOffset, double& yOffset,
|
||
|
ResamplingMethod resampling = Bilinear, bool useZeroAsTrans = true);
|
||
|
|
||
|
private:
|
||
|
|
||
|
struct TransformParameters {
|
||
|
double angle;
|
||
|
double x0;
|
||
|
double y0;
|
||
|
};
|
||
|
|
||
|
|
||
|
static int transform(void *pTransformerArg, int bDstToSrc, int nPointCount,
|
||
|
double *x, double *y, double *z, int *panSuccess);
|
||
|
|
||
|
double mAngle;
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif
|