Skip to content

Commit 42aed66

Browse files
committedJul 25, 2012
Merge branch 'raster-pipes-2'
2 parents d039c3f + 1bcd947 commit 42aed66

File tree

65 files changed

+4990
-1225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4990
-1225
lines changed
 

‎python/core/qgsrasterrenderer.sip

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class QgsRasterRenderer
2929
virtual ~QgsRasterRenderer();
3030

3131
virtual QString type() const;
32-
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel ) = 0;
32+
virtual void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
3333

34-
bool usesTransparency( QgsCoordinateReferenceSystem& srcSRS, QgsCoordinateReferenceSystem& dstSRS ) const;
34+
bool usesTransparency() const;
3535

3636
void setOpacity( double opacity );
3737
double opacity() const;
@@ -45,17 +45,6 @@ class QgsRasterRenderer
4545
void setInvertColor( bool invert );
4646
bool invertColor() const;
4747

48-
/**Set resampler for zoomed in scales. Takes ownership of the object*/
49-
void setZoomedInResampler( QgsRasterResampler* r );
50-
const QgsRasterResampler* zoomedInResampler();
51-
52-
/**Set resampler for zoomed out scales. Takes ownership of the object*/
53-
void setZoomedOutResampler( QgsRasterResampler* r );
54-
const QgsRasterResampler* zoomedOutResampler() const;
55-
56-
void setMaxOversampling( double os );
57-
double maxOversampling() const;
58-
5948
/**Get symbology items if provided by renderer*/
6049
virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
6150

@@ -76,7 +65,7 @@ class QgsPalettedRasterRenderer: QgsRasterRenderer
7665
~QgsPalettedRasterRenderer();
7766
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
7867

79-
void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
68+
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
8069

8170
/**Returns number of colors*/
8271
int nColors() const;
@@ -101,7 +90,7 @@ class QgsMultiBandColorRenderer: QgsRasterRenderer
10190

10291
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
10392

104-
void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
93+
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
10594

10695
int redBand() const;
10796
void setRedBand( int band );
@@ -137,7 +126,7 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
137126

138127
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
139128

140-
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
129+
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
141130

142131
/**Takes ownership of the shader*/
143132
void setShader( QgsRasterShader* shader );
@@ -159,7 +148,7 @@ class QgsSingleBandGrayRenderer: QgsRasterRenderer
159148

160149
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
161150

162-
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
151+
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
163152

164153
int grayBand() const;
165154
void setGrayBand( int band );
@@ -183,7 +172,7 @@ class QgsSingleBandColorDataRenderer: QgsRasterRenderer
183172

184173
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
185174

186-
virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
175+
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
187176

188177
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
189178
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class QgsRasterResampleFilter
2+
{
3+
%TypeHeaderCode
4+
#include "qgsrasterresamplefilter.h"
5+
%End
6+
7+
public:
8+
QgsRasterResampleFilter( QgsRasterFace* input = 0 );
9+
~QgsRasterResampleFilter();
10+
11+
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
12+
13+
/**Set resampler for zoomed in scales. Takes ownership of the object*/
14+
void setZoomedInResampler( QgsRasterResampler* r );
15+
const QgsRasterResampler* zoomedInResampler();
16+
17+
/**Set resampler for zoomed out scales. Takes ownership of the object*/
18+
void setZoomedOutResampler( QgsRasterResampler* r );
19+
const QgsRasterResampler* zoomedOutResampler() const;
20+
21+
void setMaxOversampling( double os );
22+
double maxOversampling() const;
23+
24+
virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) const = 0;
25+
26+
/**Sets base class members from xml. Usually called from create() methods of subclasses*/
27+
void readXML( const QDomElement& rendererElem );
28+
};
29+

0 commit comments

Comments
 (0)
Please sign in to comment.