mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
sip modified for raster pipes
This commit is contained in:
parent
82f6739c38
commit
b69ff588dc
@ -29,7 +29,7 @@ class QgsRasterRenderer
|
||||
virtual ~QgsRasterRenderer();
|
||||
|
||||
virtual QString type() const;
|
||||
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel ) = 0;
|
||||
virtual void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
bool usesTransparency( QgsCoordinateReferenceSystem& srcSRS, QgsCoordinateReferenceSystem& dstSRS ) const;
|
||||
|
||||
@ -45,17 +45,6 @@ class QgsRasterRenderer
|
||||
void setInvertColor( bool invert );
|
||||
bool invertColor() const;
|
||||
|
||||
/**Set resampler for zoomed in scales. Takes ownership of the object*/
|
||||
void setZoomedInResampler( QgsRasterResampler* r );
|
||||
const QgsRasterResampler* zoomedInResampler();
|
||||
|
||||
/**Set resampler for zoomed out scales. Takes ownership of the object*/
|
||||
void setZoomedOutResampler( QgsRasterResampler* r );
|
||||
const QgsRasterResampler* zoomedOutResampler() const;
|
||||
|
||||
void setMaxOversampling( double os );
|
||||
double maxOversampling() const;
|
||||
|
||||
/**Get symbology items if provided by renderer*/
|
||||
virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
|
||||
|
||||
@ -76,7 +65,7 @@ class QgsPalettedRasterRenderer: QgsRasterRenderer
|
||||
~QgsPalettedRasterRenderer();
|
||||
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
|
||||
|
||||
void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
|
||||
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
/**Returns number of colors*/
|
||||
int nColors() const;
|
||||
@ -101,7 +90,7 @@ class QgsMultiBandColorRenderer: QgsRasterRenderer
|
||||
|
||||
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
|
||||
|
||||
void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
|
||||
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
int redBand() const;
|
||||
void setRedBand( int band );
|
||||
@ -137,7 +126,7 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
|
||||
|
||||
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
|
||||
|
||||
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
|
||||
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
/**Takes ownership of the shader*/
|
||||
void setShader( QgsRasterShader* shader );
|
||||
@ -159,7 +148,7 @@ class QgsSingleBandGrayRenderer: QgsRasterRenderer
|
||||
|
||||
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
|
||||
|
||||
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
|
||||
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
int grayBand() const;
|
||||
void setGrayBand( int band );
|
||||
@ -183,7 +172,7 @@ class QgsSingleBandColorDataRenderer: QgsRasterRenderer
|
||||
|
||||
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
|
||||
|
||||
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
|
||||
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
|
||||
};
|
||||
|
29
python/core/qgsrasterresamplefilter.sip
Normal file
29
python/core/qgsrasterresamplefilter.sip
Normal file
@ -0,0 +1,29 @@
|
||||
class QgsRasterResampleFilter
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include "qgsrasterresamplefilter.h"
|
||||
%End
|
||||
|
||||
public:
|
||||
QgsRasterResampleFilter( QgsRasterFace* input = 0 );
|
||||
~QgsRasterResampleFilter();
|
||||
|
||||
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
|
||||
|
||||
/**Set resampler for zoomed in scales. Takes ownership of the object*/
|
||||
void setZoomedInResampler( QgsRasterResampler* r );
|
||||
const QgsRasterResampler* zoomedInResampler();
|
||||
|
||||
/**Set resampler for zoomed out scales. Takes ownership of the object*/
|
||||
void setZoomedOutResampler( QgsRasterResampler* r );
|
||||
const QgsRasterResampler* zoomedOutResampler() const;
|
||||
|
||||
void setMaxOversampling( double os );
|
||||
double maxOversampling() const;
|
||||
|
||||
virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) const = 0;
|
||||
|
||||
/**Sets base class members from xml. Usually called from create() methods of subclasses*/
|
||||
void readXML( const QDomElement& rendererElem );
|
||||
};
|
||||
|
@ -118,18 +118,18 @@ void * QgsMultiBandColorRenderer::readBlock( int bandNo, QgsRectangle const & e
|
||||
&& mAlphaBand < 1 && !mRedContrastEnhancement && !mGreenContrastEnhancement && !mBlueContrastEnhancement
|
||||
&& !mInvertColor );
|
||||
*/
|
||||
QgsRasterDataProvider::DataType redType = QgsRasterDataProvider::UnknownDataType;
|
||||
QgsRasterFace::DataType redType = QgsRasterFace::UnknownDataType;
|
||||
|
||||
if ( mRedBand > 0 )
|
||||
{
|
||||
redType = ( QgsRasterFace::DataType )mInput->dataType( mRedBand );
|
||||
}
|
||||
QgsRasterDataProvider::DataType greenType = QgsRasterDataProvider::UnknownDataType;
|
||||
QgsRasterFace::DataType greenType = QgsRasterFace::UnknownDataType;
|
||||
if ( mGreenBand > 0 )
|
||||
{
|
||||
greenType = ( QgsRasterFace::DataType )mInput->dataType( mGreenBand );
|
||||
}
|
||||
QgsRasterDataProvider::DataType blueType = QgsRasterDataProvider::UnknownDataType;
|
||||
QgsRasterFace::DataType blueType = QgsRasterFace::UnknownDataType;
|
||||
if ( mBlueBand > 0 )
|
||||
{
|
||||
blueType = ( QgsRasterFace::DataType )mInput->dataType( mBlueBand );
|
||||
|
@ -60,6 +60,9 @@ class CORE_EXPORT QgsRasterRenderer : public QgsRasterFace
|
||||
void setInvertColor( bool invert ) { mInvertColor = invert; }
|
||||
bool invertColor() const { return mInvertColor; }
|
||||
|
||||
/**Get symbology items if provided by renderer*/
|
||||
virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const { Q_UNUSED( symbolItems ); }
|
||||
|
||||
virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) const = 0;
|
||||
|
||||
/**Sets base class members from xml. Usually called from create() methods of subclasses*/
|
||||
|
@ -72,7 +72,6 @@ void * QgsSingleBandPseudoColorRenderer::readBlock( int bandNo, QgsRectangle co
|
||||
transparencyType = ( QgsRasterFace::DataType )mInput->dataType( mAlphaBand );
|
||||
}
|
||||
|
||||
void* transparencyData;
|
||||
void* transparencyData = 0;
|
||||
double currentOpacity = mOpacity;
|
||||
QgsRasterFace::DataType rasterType = ( QgsRasterFace::DataType )mInput->dataType( mBand );
|
||||
|
Loading…
x
Reference in New Issue
Block a user