@@ -29,9 +29,9 @@ class QgsRasterRenderer
29
29
virtual ~QgsRasterRenderer();
30
30
31
31
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 ) ;
33
33
34
- bool usesTransparency( QgsCoordinateReferenceSystem& srcSRS, QgsCoordinateReferenceSystem& dstSRS ) const;
34
+ bool usesTransparency() const;
35
35
36
36
void setOpacity( double opacity );
37
37
double opacity() const;
@@ -45,17 +45,6 @@ class QgsRasterRenderer
45
45
void setInvertColor( bool invert );
46
46
bool invertColor() const;
47
47
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
-
59
48
/**Get symbology items if provided by renderer*/
60
49
virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
61
50
@@ -76,7 +65,7 @@ class QgsPalettedRasterRenderer: QgsRasterRenderer
76
65
~QgsPalettedRasterRenderer();
77
66
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
78
67
79
- void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
68
+ void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
80
69
81
70
/**Returns number of colors*/
82
71
int nColors() const;
@@ -101,7 +90,7 @@ class QgsMultiBandColorRenderer: QgsRasterRenderer
101
90
102
91
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
103
92
104
- void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
93
+ void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
105
94
106
95
int redBand() const;
107
96
void setRedBand( int band );
@@ -137,7 +126,7 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
137
126
138
127
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
139
128
140
- virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
129
+ void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
141
130
142
131
/**Takes ownership of the shader*/
143
132
void setShader( QgsRasterShader* shader );
@@ -159,7 +148,7 @@ class QgsSingleBandGrayRenderer: QgsRasterRenderer
159
148
160
149
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
161
150
162
- virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
151
+ void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
163
152
164
153
int grayBand() const;
165
154
void setGrayBand( int band );
@@ -183,7 +172,7 @@ class QgsSingleBandColorDataRenderer: QgsRasterRenderer
183
172
184
173
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider );
185
174
186
- virtual void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel );
175
+ void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );
187
176
188
177
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
189
178
};
0 commit comments