@@ -29,7 +29,7 @@ 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
3434 bool usesTransparency ( QgsCoordinateReferenceSystem& srcSRS, QgsCoordinateReferenceSystem& dstSRS ) const ;
3535
@@ -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};
0 commit comments