2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrasterresampler.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
class QgsRasterResampler
|
|
|
|
{
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Interface for resampling rasters (e.g. to have a smoother appearance)
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-02 23:35:10 +02:00
|
|
|
#include "qgsrasterresampler.h"
|
|
|
|
#include "qgsbilinearrasterresampler.h"
|
|
|
|
#include "qgscubicrasterresampler.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
%ConvertToSubClassCode
|
2017-06-02 23:35:10 +02:00
|
|
|
if ( dynamic_cast<QgsBilinearRasterResampler *>( sipCpp ) != NULL )
|
|
|
|
sipType = sipType_QgsBilinearRasterResampler;
|
|
|
|
else if ( dynamic_cast<QgsCubicRasterResampler *>( sipCpp ) != NULL )
|
|
|
|
sipType = sipType_QgsCubicRasterResampler;
|
|
|
|
else
|
|
|
|
sipType = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
virtual ~QgsRasterResampler();
|
2019-10-31 08:42:38 +10:00
|
|
|
|
|
|
|
virtual void resample( const QImage &srcImage, QImage &dstImage ) = 0 /Deprecated/;
|
|
|
|
%Docstring
|
|
|
|
Resamples a source image to a destination image.
|
|
|
|
|
|
|
|
The size of the passed destination image should be respected during the resampling
|
|
|
|
process.
|
|
|
|
|
|
|
|
.. deprecated:: QGIS 3.10.1
|
|
|
|
use the more efficient QgsRasterResamplerV2 interface instead.
|
|
|
|
%End
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QString type() const = 0;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets a descriptive type identifier for this raster resampler.
|
2017-12-15 10:36:55 -04:00
|
|
|
Needs to be implemented by subclasses.
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
|
|
|
|
2017-05-03 07:45:22 +02:00
|
|
|
virtual QgsRasterResampler *clone() const = 0 /Factory/;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets a deep copy of this object.
|
2017-12-15 10:36:55 -04:00
|
|
|
Needs to be reimplemented by subclasses.
|
|
|
|
Ownership is transferred to the caller.
|
2019-11-08 17:38:58 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual int tileBufferPixels() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the optional tile buffer size in pixels. This represents
|
|
|
|
the size to buffer individual resampled tile requests prior to resampling,
|
|
|
|
in order to avoid rendering artifacts at the edges of raster tile boundaries.
|
|
|
|
|
|
|
|
.. versionadded:: 3.10.1
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2019-10-31 08:42:38 +10:00
|
|
|
|
|
|
|
class QgsRasterResamplerV2 : QgsRasterResampler
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Interface for resampling rasters (V2) (e.g. to have a smoother appearance),
|
|
|
|
which provides a more efficient interface vs QgsRasterResampler.
|
|
|
|
|
|
|
|
.. versionadded:: 3.10.1
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsrasterresampler.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual QImage resampleV2( const QImage &source, const QSize &size ) = 0;
|
|
|
|
%Docstring
|
|
|
|
Resamples a ``source`` image to the specified ``size``.
|
|
|
|
|
|
|
|
Returns the resampled image, or a null QImage if the resampling fails.
|
|
|
|
%End
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrasterresampler.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|