Skip to content

Commit 09228a2

Browse files
committedJan 10, 2012
Remove old code in raster layer
1 parent 9728e9a commit 09228a2

File tree

2 files changed

+66
-1557
lines changed

2 files changed

+66
-1557
lines changed
 

‎src/core/raster/qgsrasterlayer.cpp

Lines changed: 65 additions & 1496 deletions
Large diffs are not rendered by default.

‎src/core/raster/qgsrasterlayer.h

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
230230
PalettedSingleBandGray, // a "Palette" layer drawn in gray scale
231231
PalettedSingleBandPseudoColor, // a "Palette" layerdrawn using a pseudocolor algorithm
232232
PalettedMultiBandColor, // currently not supported
233-
MultiBandSingleGandGray, // a layer containing 2 or more bands, but a single band drawn as a range of gray colors
234-
//added in 1.6 to fix naming glitch
235-
MultiBandSingleBandGray = MultiBandSingleGandGray, // a layer containing 2 or more bands, but a single band drawn as a range of gray colors
233+
MultiBandSingleBandGray, // a layer containing 2 or more bands, but a single band drawn as a range of gray colors
236234
MultiBandSingleBandPseudoColor, //a layer containing 2 or more bands, but a single band drawn using a pseudocolor algorithm
237235
MultiBandColor, //a layer containing 2 or more bands, mapped to RGB color space. In the case of a multiband with only two bands, one band will be mapped to more than one color.
238236
SingleBandColorDataStyle // ARGB values rendered directly
@@ -946,62 +944,4 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
946944
QgsRasterRenderer* mRenderer;
947945
};
948946

949-
/*#include <QColor>
950-
951-
typedef void* GDALRasterBandH;
952-
class QgsMapToPixel;
953-
struct QgsRasterViewPort;
954-
class QImage;
955-
class QPainter;*/
956-
957-
/**A class encapsulates reading from a raster band and drawing the pixels to a painter.
958-
The class allows sequential reading of the scan lines and setting the image scan line pixels. It automatically decides
959-
on how much of the band / image should stay in virtual memory at a time*/
960-
class CORE_EXPORT QgsRasterImageBuffer
961-
{
962-
public:
963-
QgsRasterImageBuffer( QgsRasterDataProvider *dataProvider, int bandNo, QPainter* p,
964-
QgsRasterViewPort* viewPort, const QgsMapToPixel* mapToPixel, double* mGeoTransform );
965-
~QgsRasterImageBuffer();
966-
void reset( int maxPixelsInVirtualMemory = 5000000 );
967-
/**Returns a pointer to the next scan line (or 0 if end)*/
968-
bool nextScanLine( QRgb** imageScanLine, void** rasterScanLine );
969-
970-
void setWritingEnabled( bool enabled ) { mWritingEnabled = enabled; }
971-
972-
private:
973-
QgsRasterImageBuffer(); //forbidden
974-
/**Creates next part image. Returns false if at end*/
975-
bool createNextPartImage();
976-
977-
/**Peter's fix for zoomed in rasters*/
978-
void drawPixelRectangle();
979-
980-
QgsRasterDataProvider* mDataProvider;
981-
int mBandNo;
982-
QPainter* mPainter;
983-
QgsRasterViewPort* mViewPort;
984-
const QgsMapToPixel* mMapToPixel;
985-
double* mGeoTransform;
986-
987-
bool mValid;
988-
/**True (default), if values are written to an image. If false, the class only reads the values, but does not create an image*/
989-
bool mWritingEnabled;
990-
/**Draws the raster pixels as rectangles. This is only used if the map units per pixel is very, very small*/
991-
bool mDrawPixelRect;
992-
int mCurrentRow;
993-
int mNumPartImages; //number of part images
994-
int mNumRasterRowsPerPart; //number of (raster source) rows per part
995-
int mCurrentPartRasterMin; //minimum (raster source) row of current image
996-
int mCurrentPartRasterMax; //maximum (raster source) row of current image
997-
int mCurrentPartImageRow; //current image row
998-
int mNumCurrentImageRows; //number of image rows for the current part
999-
1000-
int mCurrentPart;
1001-
1002-
//current memory image and gdal scan data
1003-
QImage* mCurrentImage;
1004-
void* mCurrentGDALData;
1005-
};
1006-
1007947
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.